Skip to content

Commit

Permalink
Fix http framework module that errors using SDK 2.1.801 (#15854)
Browse files Browse the repository at this point in the history
- 2.1.801 seems to have a problem with:

```
						using (var uint8Buffer = Uint8Array.From(await request.Content.ReadAsByteArrayAsync ()))
```
  • Loading branch information
monojenkins authored and akoeplinger committed Jul 26, 2019
1 parent 761220d commit c16ec8c
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -93,7 +93,11 @@ private async Task doFetch (TaskCompletionSource<HttpResponseMessage> tcs, HttpR
if (request.Content is StringContent) {
requestObject.SetObjectProperty ("body", await request.Content.ReadAsStringAsync ());
} else {
using (var uint8Buffer = Uint8Array.From(await request.Content.ReadAsByteArrayAsync ()))
// 2.1.801 seems to have a problem with the line
// using (var uint8Buffer = Uint8Array.From(await request.Content.ReadAsByteArrayAsync ()))
// so we split it up into two lines.
var byteAsync = await request.Content.ReadAsByteArrayAsync ();
using (var uint8Buffer = Uint8Array.From(byteAsync))
{
requestObject.SetObjectProperty ("body", uint8Buffer);
}
Expand Down

0 comments on commit c16ec8c

Please sign in to comment.