You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var body = options.body ? options.body : new Buffer(0);
if (typeof body === 'string') body = new Buffer(body);
assert(Buffer.isBuffer(body), 'body should be a Buffer or a String');
if (!headers.has('Content-Length')) {
headers.set('Content-Length', body.length);
}
Setting body to an empty dictionary so that body.length would be undefined doesn't help either because it checks what kind of a thing the body is.
The text was updated successfully, but these errors were encountered:
here:
var body = options.body ? options.body : new Buffer(0);
if (typeof body === 'string') body = new Buffer(body);
assert(Buffer.isBuffer(body), 'body should be a Buffer or a String');
if (!headers.has('Content-Length')) {
headers.set('Content-Length', body.length);
}
Setting body to an empty dictionary so that body.length would be undefined doesn't help either because it checks what kind of a thing the body is.
The text was updated successfully, but these errors were encountered: