Skip to content

[DOCS]: Options for custom agent are incorrect #785

@packrat386

Description

@packrat386

Describe the need

See: https://github.com/octokit/request.js?tab=readme-ov-file#set-a-custom-agent-to-your-requests

The given structure of the options is:

{
  username: "octocat",
  headers: {
    "X-GitHub-Api-Version": "2022-11-28",
  },
  options: {
    request: {
      fetch: myFetch,
    },
  },
}

which incorrectly nests request: under options:. You can see in the tests that no such nesting exists https://github.com/octokit/request.js/blob/main/test/request.test.ts#L585-L593 (and if you change the test to match the README it will fail).

SDK Version

No response

API Version

No response

Relevant log output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions