Skip to content

Send accept header when getting token #6

@btoews

Description

@btoews

Some OAuth providers (Eg. GitHub) send a different response format depending on the Accept header from the token request. The default for GitHub is form encoded, but it can also return JSON and XML. GitHub's API can be made to work as-is by setting setTokenFormat(OAuth2.TOKEN_FORMAT.FORM_URL_ENCODED), but it would be cool if things worked out of the box. Since this library expects JSON by default, it would be nice if it sent Accept: application/json.

Github API OAuth Docs

Thanks for writing this library! It will be very helpful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions