Skip to content

Commit cf5bc36

Browse files
committed
Merge pull request AsyncHttpClient#193 from dadoonet/getwithbody
Following HTTP RFC, GET can contain a BODY
2 parents 8d3622b + 9087e43 commit cf5bc36

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

api/src/main/java/com/ning/http/client/RequestBuilderBase.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,8 +459,8 @@ private void resetMultipartData() {
459459
}
460460

461461
private void checkIfBodyAllowed() {
462-
if ("GET".equals(request.method) || "HEAD".equals(request.method)) {
463-
throw new IllegalArgumentException("Can NOT set Body on HTTP Request Method GET nor HEAD.");
462+
if ("HEAD".equals(request.method)) {
463+
throw new IllegalArgumentException("Can NOT set Body on HTTP Request Method HEAD.");
464464
}
465465
}
466466

0 commit comments

Comments
 (0)