-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
All DELETE api calls returns error 400 (Bad request) #76
Comments
Same stuff for |
Hey @priteshpagar93 and @xobotyi, can you provide
Thanks |
g, err := gerrit.NewClient(host, nil)
if err != nil {
panic(err)
}
g.Authentication.SetBasicAuth(username, password)
if _, _, err := g.Access.ListAccessRights(nil); err != nil {
panic(err)
}
if _, err := g.Changes.DeleteReviewer("existing change id", "account id that set as reviewer"); err != nil {
panic(err)
} |
@andygrunwald made a PR fixing the issue |
andygrunwald
added a commit
that referenced
this issue
Jul 26, 2021
* fix: no need to send content-type header if no header sent close: #76 * Update gerrit.go Co-authored-by: Andy Grunwald <[email protected]>
Thanks both |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Functions ChangesService.DeleteTopic, ChangesService.DeleteDraftChange returns error '400 Bad Requests'.
RCA:
In function NewRequest (inside gerrit.go), we set following headers:
Accept: application/json
Content-Type: application/json
This works for GET, POST api calls.
But as DELETE api calls does not need any content-type, they return 400.
The text was updated successfully, but these errors were encountered: