apollo-link-http
Advanced tools
Comparing version 1.6.0-alpha.3 to 1.6.0-alpha.4
@@ -71,3 +71,3 @@ (function (global, factory) { | ||
// Check that length of body matches the Content-Length | ||
if (Buffer.byteLength(body, 'UTF-8') !== contentLength) { | ||
if (new TextEncoder().encode(body).length !== contentLength) { | ||
return null; | ||
@@ -159,4 +159,6 @@ } | ||
response.headers.get('Content-Type').indexOf('multipart/mixed') >= 0) { | ||
if (response.body !== undefined) { | ||
// For the majority of browsers with support for ReadableStream | ||
if (response.body !== undefined && | ||
typeof TextDecoder !== 'undefined' && | ||
typeof TextEncoder !== 'undefined') { | ||
// For the majority of browsers with support for ReadableStream and TextDecoder | ||
var reader_1 = response.body.getReader(); | ||
@@ -163,0 +165,0 @@ var textDecoder_1 = new TextDecoder(); |
@@ -68,3 +68,3 @@ var __extends = (this && this.__extends) || (function () { | ||
// Check that length of body matches the Content-Length | ||
if (Buffer.byteLength(body, 'UTF-8') !== contentLength) { | ||
if (new TextEncoder().encode(body).length !== contentLength) { | ||
return null; | ||
@@ -156,4 +156,6 @@ } | ||
response.headers.get('Content-Type').indexOf('multipart/mixed') >= 0) { | ||
if (response.body !== undefined) { | ||
// For the majority of browsers with support for ReadableStream | ||
if (response.body !== undefined && | ||
typeof TextDecoder !== 'undefined' && | ||
typeof TextEncoder !== 'undefined') { | ||
// For the majority of browsers with support for ReadableStream and TextDecoder | ||
var reader_1 = response.body.getReader(); | ||
@@ -160,0 +162,0 @@ var textDecoder_1 = new TextDecoder(); |
{ | ||
"name": "apollo-link-http", | ||
"version": "1.6.0-alpha.3", | ||
"version": "1.6.0-alpha.4", | ||
"description": "HTTP transport layer for GraphQL", | ||
@@ -5,0 +5,0 @@ "author": "Evans Hauser <evanshauser@gmail.com>", |
@@ -90,3 +90,3 @@ import { | ||
// Check that length of body matches the Content-Length | ||
if (Buffer.byteLength(body, 'UTF-8') !== contentLength) { | ||
if (new TextEncoder().encode(body).length !== contentLength) { | ||
return null; | ||
@@ -205,4 +205,8 @@ } | ||
) { | ||
if (response.body !== undefined) { | ||
// For the majority of browsers with support for ReadableStream | ||
if ( | ||
response.body !== undefined && | ||
typeof TextDecoder !== 'undefined' && | ||
typeof TextEncoder !== 'undefined' | ||
) { | ||
// For the majority of browsers with support for ReadableStream and TextDecoder | ||
const reader = response.body.getReader(); | ||
@@ -209,0 +213,0 @@ const textDecoder = new TextDecoder(); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
124551
2007