restsharp/RestSharp — Issue #225: Unable to post mulitpart-form data
Author: epetre
Created: 2012-03-01 16:12:30+00:00
State: open

I asked a question on stackoverflow too about this.

http://stackoverflow.com/questions/9519682/restsharp-posting-bytearray-stream-data

Here is the copy/paste

trying to post a byte array or memory stream with RestSharp.

I have tried the following

request.AddFile("stream", x => new MemoryStream(blocks.First().Value), "stream", "application/binary");
And

request.AddFile("stream", blocks.First().Value, "stream", "application/binary");
Where blocks.First().Value is a Byte Array

On the server end I am expecting a form with stream parameter in it that I can extract the bytes from.