Override url when getting paginated results in octokit-js #2142
-
We have to access our instance of GHE through a proxy, which requires a port number to be added to the URL. We create an
We then get the page iterator as
The first page comes through fine, but the subsequent page fails.
Note the lack of port. That doesn't really surprise me, since GitHub Enterprise doesn't know what port the proxy is using, of course. Is there some way to communicate the port (or complete base URL) which will return a valid link header including the port? Or do we just have to resort to manual paging, parsing/modifying the link header as required? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Maybe you could implement that using an http(s) Agent? You can set it using new Octokit({
request: { agent }
}) See the |
Beta Was this translation helpful? Give feedback.
-
The solution we found was to override |
Beta Was this translation helpful? Give feedback.
The solution we found was to override
request.fetch
on theOctokit
constructor options, so that the URL could be rewritten as necessary.