Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add application/json header when sending json data. #350

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

kounoike
Copy link

I'm using Jenkins and SonarQube GitHub plugins with GitBucket.
GitBucket has GitHub-compatible API.
But it is not 100% compatible. This PR solves one of the differences between GitHub and GitBucket. And, it also solves header and body data format mismatch when sending json data.

in current version's Requester.java buildRequest sends json data with content-type: application/x-www-form-urlencoded.
This behavior is incorrect. data and header mismatch. Then, GitBucket was confused by how to handle data.

In GitHub API, GitHub parses this data as json (header content-type is ignored), but this behavior is not documented. In the future this behavior may change.

I think that it is better to accept this modification to avoid future problems.

kohsuke added a commit that referenced this pull request Sep 9, 2017
@kohsuke
Copy link
Collaborator

kohsuke commented Sep 9, 2017

In order to honor the content type set by the caller of Requester, I fixed this problem a little differently. The fix will be in 1.89

@kohsuke kohsuke closed this Sep 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.