Skip to content

Commit 63e5e69

Browse files
authoredNov 7, 2022
docs(README): Remove headers from usage example (#291)
1 parent a13c86e commit 63e5e69

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed
 

‎README.md

+5-10
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,7 @@ const TOKEN = "ghp_PersonalAccessToken01245678900000000";
205205
const auth = createTokenAuth(TOKEN);
206206
const authentication = await auth();
207207

208-
const response = await request("HEAD /", {
209-
headers: authentication.headers,
210-
});
208+
const response = await request("HEAD /");
211209
const scopes = response.headers["x-oauth-scopes"].split(/,\s+/);
212210

213211
if (scopes.length) {
@@ -227,9 +225,7 @@ const TOKEN = "ghp_PersonalAccessToken01245678900000000";
227225
const auth = createTokenAuth(TOKEN);
228226
const authentication = await auth();
229227

230-
const response = await request("HEAD /", {
231-
headers: authentication.headers,
232-
});
228+
const response = await request("HEAD /");
233229
const clientId = response.headers["x-oauth-client-id"];
234230

235231
if (clientId) {
@@ -252,12 +248,11 @@ const auth = createTokenAuth(TOKEN);
252248
const authentication = await auth();
253249

254250
const response = await request("GET /repos/{owner}/{repo}", {
255-
owner: 'octocat',
256-
repo: 'hello-world'
257-
headers: authentication.headers
251+
owner: "octocat",
252+
repo: "hello-world",
258253
});
259254

260-
console.log(response.data.permissions)
255+
console.log(response.data.permissions);
261256
// {
262257
// admin: true,
263258
// push: true,

0 commit comments

Comments
 (0)
Please sign in to comment.