コード例 #1
0
        public static async Task <Stream> AsStream(this FluentHttpClientResponse response)
        {
            var stream = await response.Message.Content.ReadAsStreamAsync().ConfigureAwait(false);

            stream.Position = 0;
            return(stream);
        }
コード例 #2
0
        public static async Task <T> As <T>(this FluentHttpClientResponse response)
        {
            var streamContent = await response.Message.Content.ReadAsStreamAsync().ConfigureAwait(false);

            return(DeserializeJsonFromStream <T>(streamContent));
        }
コード例 #3
0
 public static async Task <byte[]> AsByteArray(this FluentHttpClientResponse response)
 {
     return(await response.Message.Content.ReadAsByteArrayAsync().ConfigureAwait(false));
 }
コード例 #4
0
 public static async Task <string> AsString(this FluentHttpClientResponse response)
 {
     return(await response.Message.Content.ReadAsStringAsync().ConfigureAwait(false));
 }