Skip to content

Commit 1b8db2d

Browse files
author
Stephane Landelle
committed
All GET requests to have a body, close AsyncHttpClient#292
1 parent 0fc7442 commit 1b8db2d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

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

494494
private void checkIfBodyAllowed() {
495-
if ("GET".equals(request.method) || "HEAD".equals(request.method)) {
496-
throw new IllegalArgumentException("Can NOT set Body on HTTP Request Method GET nor HEAD.");
495+
if ("HEAD".equals(request.method)) {
496+
throw new IllegalArgumentException("Can NOT set Body on HTTP Request Method HEAD.");
497497
}
498498
}
499499

0 commit comments

Comments
 (0)