octokit/rest.js#881

node v10.24.1
version: 1.1.0
endpointsharetweet
Getting the URL for endpoints with 3xx redirects: https://github.com/octokit/rest.js/issues/881. Demo to show that node-fetch works in Node.
const fetch = require('node-fetch') await fetch('https://api.github.com/repos/octocat/Hello-World/tarball/master', {method: 'HEAD'}) .then(response => { console.log(`URL: ${response.url}`) })
But currently did not work when using `@octokit/rest` < v16.11.0
const octokit16100 = require('@octokit/rest@16.10.0')() await octokit16100.repos.getArchiveLink({ method: 'HEAD', owner: 'octocat', repo: 'Hello-World', archive_format: 'tarball', ref: 'master' }) .then(response => { console.log(`URL: ${response.url}`) })
But it was resolved with v16.11.0
const octokit16110 = require('@octokit/rest@16.11.0')() await octokit16110.repos.getArchiveLink({ method: 'HEAD', owner: 'octocat', repo: 'Hello-World', archive_format: 'tarball', ref: 'master' }) .then(response => { console.log(`URL: ${response.url}`) })
Loading…

1 comment

  • posted 5 years ago by alkanalkn63
    Hi recovery my google archive on open please now please thanksl we my family problem please on open

sign in to comment