From ba4a324d6fc5c121775013c7a19f2fc98660e80d Mon Sep 17 00:00:00 2001 From: Brian Lukoff Date: Thu, 22 Jul 2021 13:21:20 -0500 Subject: [PATCH 1/3] Update history with http breaking change. --- History.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/History.md b/History.md index 306fd58402..e994cf8ce2 100644 --- a/History.md +++ b/History.md @@ -139,7 +139,7 @@ - This package is now deprecated * `http@2.0.0` - - Internally http has been replaced by [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API), should still work as previous version, but edge cases might be different. This is to aid you in transition to fetch. + - Internally http has been replaced by [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API), should still work as previous version, but edge cases might be different. This is to aid you in transition to fetch. Note that this means that the `npmRequestOptions` parameter to `HTTP.call` has been removed, as `request` is no longer used internally. * `socket-stream-client@0.4.0` - Remove IE8 checks From 4158a9d860a79924dc081a8118cfaee50d72524f Mon Sep 17 00:00:00 2001 From: Brian Lukoff Date: Thu, 22 Jul 2021 13:22:38 -0500 Subject: [PATCH 2/3] Remove reference to npmRequestOptions. --- packages/deprecated/http/httpcall_client.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/deprecated/http/httpcall_client.js b/packages/deprecated/http/httpcall_client.js index c3964ac349..5cfb02a0df 100644 --- a/packages/deprecated/http/httpcall_client.js +++ b/packages/deprecated/http/httpcall_client.js @@ -18,7 +18,6 @@ var hasOwn = Object.prototype.hasOwnProperty; * @param {Object} options.headers Dictionary of strings, headers to add to the HTTP request. * @param {Number} options.timeout Maximum time in milliseconds to wait for the request before failing. There is no timeout by default. * @param {Boolean} options.followRedirects If `true`, transparently follow HTTP redirects. Cannot be set to `false` on the client. Default `true`. - * @param {Object} options.npmRequestOptions On the server, `HTTP.call` is implemented by using the [npm `request` module](https://www.npmjs.com/package/request). Any options in this object will be passed directly to the `request` invocation. * @param {Function} options.beforeSend On the client, this will be called before the request is sent to allow for more direct manipulation of the underlying XMLHttpRequest object, which will be passed as the first argument. If the callback returns `false`, the request will be not be sent. * @param {Function} [asyncCallback] Optional callback. If passed, the method runs asynchronously, instead of synchronously, and calls asyncCallback. On the client, this callback is required. */ @@ -59,9 +58,6 @@ HTTP.call = function(method, url, options, callback) { if (options.followRedirects === false) throw new Error("Option followRedirects:false not supported on client."); - if (hasOwn.call(options, 'npmRequestOptions')) { - throw new Error("Option npmRequestOptions not supported on client."); - } var username, password; if (options.auth) { From 5ef8f667c0054dfa3103e823ed51b88d1e2f301e Mon Sep 17 00:00:00 2001 From: Brian Lukoff Date: Thu, 22 Jul 2021 13:23:09 -0500 Subject: [PATCH 3/3] Remove comment referencing npmRequestOptions. --- packages/deprecated/http/httpcall_server.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/deprecated/http/httpcall_server.js b/packages/deprecated/http/httpcall_server.js index a9b0029c7f..0413d0bdba 100644 --- a/packages/deprecated/http/httpcall_server.js +++ b/packages/deprecated/http/httpcall_server.js @@ -112,9 +112,6 @@ function _call (method, url, options, callback) { ////////// Kickoff! ////////// - // Allow users to override any request option with the npmRequestOptions - // option. - const requestOptions = { method: method, caching: caching,