We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When I call client.Issue.RemoveWatcher, I get a HTTP 400 response.
For the call to succeed.
_, _ = client.Issue.RemoveWatcher(issue.ID, "[email protected]")
The code seems to pass the username as the body to the DELETE call, however the API docs indicate is should be in a query parameter named username.
username
I was able to resolve it with my own function:
func removeWatcher(client *jira.Client, issueID string, username string) error { apiEndPoint := fmt.Sprintf("rest/api/2/issue/%s/watchers?username=%s", issueID, url.QueryEscape(username)) req, err := client.NewRequestWithContext(context.TODO(), "DELETE", apiEndPoint, nil) if err != nil { return err } resp, err := client.Do(req, nil) if err != nil { err = jira.NewJiraError(resp, err) } return err }
Include as many relevant details about the environment you experienced the problem in
1.16.0
go version
go version go1.19.6 darwin/arm64
v9.6.0#960000-sha1:a3ee8af
The text was updated successfully, but these errors were encountered:
No branches or pull requests
What happened?
When I call client.Issue.RemoveWatcher, I get a HTTP 400 response.
What did you expect to happen?
For the call to succeed.
How can we reproduce it (as minimally and precisely as possible)?
Anything else we need to know?
The code seems to pass the username as the body to the DELETE call, however the API docs indicate is should be in a query parameter named
username
.I was able to resolve it with my own function:
Your Environment
Include as many relevant details about the environment you experienced the problem in
1.16.0
go version
):go version go1.19.6 darwin/arm64
v9.6.0#960000-sha1:a3ee8af
The text was updated successfully, but these errors were encountered: