Gregor 5bf104c841 feat: `response.status` 6 سال پیش
..
README.md c2c88c0420 refactor: node-github -> @octokit/rest 7 سال پیش
get-buffer-response-browser.js 68c0900960 refactor: use node-fetch for universal request code 7 سال پیش
get-buffer-response.js 68c0900960 refactor: use node-fetch for universal request code 7 سال پیش
http-error.js 56ea1d254f fix: set error.headers if present 6 سال پیش
index.js c2c88c0420 refactor: node-github -> @octokit/rest 7 سال پیش
is-array-buffer.js 42544b2052 fix: inline `is-array-buffer` for webpack compatibility 7 سال پیش
request.js 5bf104c841 feat: `response.status` 6 سال پیش

README.md

[back to @octokit/rest]('../..')

@octokit/rest/request

Turn REST API endpoint options into generic request options


⚠️ This is not a public API at this point and can change at any time


Usage

const octokitRestRequest = require('@octokit/rest/lib/request')

octokitRestRequest({
  // request options
  method: 'GET',
  url: '/orgs/:org/repos',
  // parameters
  org: 'octokit',
  type: 'private'
}) // returns promise

Sends a GET request to https://api.github.com/orgs/octokit/repos?type=private&per_page=20&page=2 with user-agent and accept headers set.

It accepts the same options and has the same defaults as @octokit/rest/endpoint