@octokit/request
Advanced tools
Comparing version 1.2.1 to 1.2.2
@@ -11,5 +11,3 @@ 'use strict' | ||
function request (endpoint, route, options) { | ||
const requestOptions = endpoint(route, options) | ||
function request (requestOptions) { | ||
if (isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) { | ||
@@ -16,0 +14,0 @@ requestOptions.body = JSON.stringify(requestOptions.body) |
@@ -7,3 +7,6 @@ module.exports = withDefaults | ||
const endpoint = oldEndpoint.defaults(newDefaults) | ||
const newApi = request.bind(null, endpoint) | ||
const newApi = function (route, options) { | ||
return request(endpoint(route, options)) | ||
} | ||
newApi.endpoint = endpoint | ||
@@ -10,0 +13,0 @@ newApi.defaults = withDefaults.bind(null, endpoint) |
{ | ||
"name": "@octokit/request", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"publishConfig": { | ||
@@ -5,0 +5,0 @@ "access": "public" |
@@ -173,3 +173,3 @@ # request.js | ||
<td> | ||
Pass [node-fetch extensions options](https://github.com/bitinn/node-fetch#options), such as `agent` or `timeout` | ||
Pass <a href="https://github.com/bitinn/node-fetch#options">node-fetch extensions options</a>, such as <code>agent</code> or <code>timeout</code> | ||
</td> | ||
@@ -176,0 +176,0 @@ </tr> |
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
31977
449