-
Notifications
You must be signed in to change notification settings - Fork 736
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -287,7 +287,7 @@ public String getResponseHeader(String header) { | |
* Set up the request parameters or POST payload. | ||
*/ | ||
private void buildRequest() throws IOException { | ||
if (!method.equals("GET")) { | ||
if (isMethodWithBody()) { | ||
uc.setDoOutput(true); | ||
uc.setRequestProperty("Content-type", contentType); | ||
|
||
|
@@ -296,7 +296,6 @@ private void buildRequest() throws IOException { | |
for (Entry e : args) { | ||
json.put(e.key, e.value); | ||
} | ||
MAPPER.writeValue(uc.getOutputStream(), json); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
kohsuke
Author
Collaborator
|
||
} else { | ||
try { | ||
byte[] bytes = new byte[32768]; | ||
|
@@ -311,6 +310,12 @@ private void buildRequest() throws IOException { | |
} | ||
} | ||
|
||
private boolean isMethodWithBody() { | ||
if (method.equals("GET")) return false; | ||
if (method.equals("DELETE")) return false; | ||
return true; | ||
} | ||
|
||
/** | ||
* Loads pagenated resources. | ||
* | ||
|
Seems this change is breaking creation of pull requests (and probably other things) since json Map is no more used.