I tired sending post request in RestSharp. For some reasons, I must send a byte array.
But I tried using one way, and it didn't work.
restRequest.AddParameter(string.Empty, array, ParameterType.RequestBody);
In fact, it just send a string:
System.Byte[]
It seems that RestSharp call the ToString() method.
How can I send a byte array?
You can see the extension method that will help you with this here: RestRequestExtensions AddBody method. If request.RequestFormat == DataFormat.Binary without a Content-Type then that method should work. If the obj parameter has the type byte[], it should do what you desire.