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

I encountered a ClientProtocolException problem #458

Open
liuzul opened this issue May 29, 2020 · 0 comments
Open

I encountered a ClientProtocolException problem #458

liuzul opened this issue May 29, 2020 · 0 comments

Comments

@liuzul
Copy link

liuzul commented May 29, 2020

I encountered a ClientProtocolException problem when I called the build.Stop() method with Jenkins server version 2.32.2;
public String Stop() throws HttpResponseException, IOException {
try {
return client.get(url + "stop");
} catch (IOException ex) {
if (((HttpResponseException) ex).getStatusCode() == 405) {
stopPost();
return "";
}
}
return "";
}

This version of the stop API should be Post on http://url/job/testJob/1/stop, but is actually call the Get http://url/job/testJob/1/stop/api/json, resulting in Jenkins CircularRedirectException from server

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

No branches or pull requests

1 participant