Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I'm just starting out with the new API's as well (so this might be off a bit), but based on the documentation:</p> <ul> <li><a href="http://msdn.microsoft.com/en-us/library/system.net.http.httpclient%28v=vs.110%29.aspx" rel="nofollow"><code>HttpClient</code></a> (and it's default handler <a href="http://msdn.microsoft.com/en-us/library/system.net.http.httpclienthandler%28v=vs.110%29.aspx" rel="nofollow"><code>HttpClientHandler</code></a>) return a <a href="http://msdn.microsoft.com/en-us/library/system.net.http.httpresponsemessage%28v=vs.110%29.aspx" rel="nofollow"><code>Task&lt;HttpResponseMessage&gt;</code></a> from <a href="http://msdn.microsoft.com/en-us/library/hh138176%28v=vs.110%29.aspx" rel="nofollow"><code>SendAsync</code></a>. </li> <li>The <a href="http://msdn.microsoft.com/en-us/library/system.net.http.httpresponsemessage%28v=vs.110%29.aspx" rel="nofollow"><code>HttpResponseMessage</code></a> has a property, <a href="http://msdn.microsoft.com/en-us/library/system.net.http.httpresponsemessage.content%28v=vs.110%29.aspx" rel="nofollow"><code>Content</code></a> which is of type <a href="http://msdn.microsoft.com/en-us/library/system.net.http.httpcontent%28v=vs.110%29.aspx" rel="nofollow"><code>HttpContent</code></a>. </li> <li><a href="http://msdn.microsoft.com/en-us/library/system.net.http.httpcontent%28v=vs.110%29.aspx" rel="nofollow"><code>HttpContent</code></a> in turn has a method, <a href="http://msdn.microsoft.com/en-us/library/system.net.http.httpcontent.readasstreamasync%28v=vs.110%29.aspx" rel="nofollow"><code>ReadAsStreamAsync</code></a>, which returns <a href="http://msdn.microsoft.com/en-us/library/system.io.stream%28v=vs.110%29.aspx" rel="nofollow"><code>Task&lt;Stream&gt;</code></a> which you should be able to use (albeit indirectly) to pass to <a href="http://msdn.microsoft.com/en-us/library/system.io.compression.ziparchive%28v=vs.110%29.aspx" rel="nofollow"><code>ZipArchive</code></a>.</li> </ul> <p><strong>Or</strong> you can just use the <a href="http://msdn.microsoft.com/en-us/library/hh551738%28v=vs.110%29.aspx" rel="nofollow"><code>HttpClient.GetStreamAsync</code></a> method to get the stream (much simpler):</p> <pre><code>HttpClient client = new HttpClient(); Stream stream = await client.GetStreamAsync(uri); </code></pre> <p><sub><strike>If that doesn't work then you could also just wrap the string you get now in a <a href="http://msdn.microsoft.com/en-us/library/system.io.memorystream.aspx" rel="nofollow"><code>MemoryStream</code></a> and pass it to <a href="http://msdn.microsoft.com/en-us/library/system.io.compression.ziparchive%28v=vs.110%29.aspx" rel="nofollow"><code>ZipArchive</code></a> but that sounds kind of unsafe because of possible encoding problems.</strike></sub></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload