I want to be able to read a http stream before that all the response is received.
This code works perfectly with the .Net framework :
System.Net.Http.HttpClient client = new System.Net.Http.HttpClient();
var stream = client.GetStreamAsync("http://www.google.com").Result;
using (var reader = new StreamReader(stream))
string lineRead = reader.ReadLine();
The code blocks at "!reader.EndOfStream" and as soon as there is new data in the stream, I can read it.
In mono, the code blocks at "var stream = client.GetStreamAsync("http://www.google.com").Result;" and only unblocks when all the data is received. I think it is because in mono, in the GetStreamAsync method, you set the HttpCompletionOption to ResponseContentRead while it should be set to ResponseHeadersRead
Instead of using GetStreamAsync to get the stream, I can use "GetAsync(uri, HttpCompletionOption.ResponseHeadersRead).Result.Content.ReadAsStreamAsync().Result"
Fixed in master