Skip to content

The cURL code samples in the API docs have a typo in the Authorization Header line #26708

Closed
@WhiteFruit

Description

@WhiteFruit

Code of Conduct

What article on docs.github.com is affected?

Seemingly all instances of cURL code samples in the API docs include the below typo. I have only spot-checked, but tracking the source of the issue leads me to believe all instances would have the same problem.

Screenshot 2023-07-14 at 10 30 13 AM

If you copy/paste that full command (replacing the necessary variables "<YOUR-TOKEN>", "OWNER", and "REPO" with valid values), you will get a cURL error:

curl: (3) URL using bad/illegal format or missing URL
{
  "message": "Bad credentials",
  "documentation_url": "https://docs.github.com/rest"
}

What changes are you suggesting?

The authorization header line in the cURL code samples should have a space before the backslash escape character at the end of the line:
-H "Authorization: Bearer <YOUR-TOKEN>"\ should be -H "Authorization: Bearer <YOUR-TOKEN>" \

Screenshot 2023-07-14 at 10 30 52 AM

I opened PR #26706 to address this, but the file is restricted since it's in the src directory.

Additional information

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    contentThis issue or pull request belongs to the Docs Content team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions