Skip to content
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

Fix IIssueLabelsClient.RemoveFromIssue() #1868

Merged
merged 1 commit into from
Sep 8, 2018
Merged

Conversation

ryangribble
Copy link
Contributor

Fixes #1865

IIssueLabelsClient.RemoveFromIssue() was incorrectly passing an accept header to the body parameter of the delete call. Recent upstream api changes seem to have occured where this previously ignored situation is now being rejected as the body can't be parsed as valid json. Also the preview functionality for label emojis/descriptions wouldnt have been working on this call due to the accept header not being passed correctly.

This PR fixes the issue by adding an overload for ApiConnection.Delete<T>(Uri uri, string accepts) that takes a Uri and accept header, but no body, which the existing code in RemoveFromIssue() will now use instead of ApiConnection.Delete<T>(Uri uri, object data)

Copy link
Member

@shiftkey shiftkey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find!

@ryangribble
Copy link
Contributor Author

release_notes: IssueLabelsClient.RemoveFromIssue() no longer fails with a HTTP 400 "Bad Request" error from the GitHub Api

@ryangribble ryangribble merged commit cee6635 into master Sep 8, 2018
@ryangribble ryangribble deleted the fix-delete-issue branch September 8, 2018 23:59
ziranquliu added a commit to ziranquliu/octokit.net that referenced this pull request Sep 13, 2018
* 'master' of https://github.com/ziranquliu/octokit.net:
  Release v0.32 - App-stravaganza!  (octokit#1864)
  provide a Delete<T>() overload that takes a Uri and accept header, but no body (octokit#1868)
@nickfloyd nickfloyd added Type: Bug Something isn't working as documented and removed category: bug labels Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working as documented
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IIssuesLabelClient.RemoveFromIssue started returning "Error parsing JSON"
3 participants