Comparing version 1.1.1 to 1.1.2
@@ -257,6 +257,8 @@ var Promise, S, addErrorData, bhttpAPI, bhttpErrors, concatStream, createCookieJar, debug, debugRequest, debugResponse, devNull, doPayloadRequest, doRedirect, errors, extend, formData, formFixArray, http, https, isStream, makeRequest, ofTypes, packageConfig, prepareCleanup, prepareDefaults, prepareOptions, preparePayload, prepareProtocol, prepareRequest, prepareSession, prepareUrl, processResponse, querystring, redirectGet, redirectUnchanged, sink, spy, stream, streamLength, toughCookie, urlUtil, util, _; | ||
debugRequest("got url-encodable form-data"); | ||
request.options.headers["content-type"] = "application/x-www-form-urlencoded"; | ||
if (request.options.encodeJSON) { | ||
debugRequest("... but encodeJSON was set, so we will send JSON instead"); | ||
request.options.headers["content-type"] = "application/json"; | ||
request.payload = JSON.stringify((_ref1 = request.options.formFields) != null ? _ref1 : null); | ||
} else if (!_.isEmpty(request.options.formFields)) { | ||
request.options.headers["content-type"] = "application/x-www-form-urlencoded"; | ||
request.payload = querystring.stringify(formFixArray(request.options.formFields)); | ||
@@ -263,0 +265,0 @@ } else { |
{ | ||
"name": "bhttp", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "A sane HTTP client library for Node.js with Streams2 support.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3149834
748