Skip to content

415 'Unsupported Media Type' when POSTing #144

Closed
@lopis

Description

@lopis

While trying to use the REST API to vote on an issue, I got the 415 'Unsupported Media Type' error. The API seems to expect that these requests body are in application/json format, but the requests are instead being sent as application/x-www-form-urlencoded.

Could this be a change from the API or am I missing some config? Other POST calls seem to also expect JSON. Adding the following line to the request config fixes the problem:

https://github.com/lopis/jira.js/blob/master/src/version3/issueVotes.ts#L85

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIndicates a reported issue or malfunction that needs fixing.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions