You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2023/02/25 08:27:41 UTC
[httpcomponents-core] 01/02: The official document POST example incorrectly calls the GET method. For beginners, it is necessary to revise
This is an automated email from the ASF dual-hosted git repository.
olegk pushed a commit to branch 5.3.x
in repository https://gitbox.apache.org/repos/asf/httpcomponents-core.git
commit 759a702dae9e46a1b6c47f24ae481aee65210e3b
Author: hooyantsing <hu...@ebupt.com>
AuthorDate: Fri Feb 17 15:34:41 2023 +0800
The official document POST example incorrectly calls the GET method. For beginners, it is necessary to revise
---
.../org/apache/hc/core5/http/examples/ClassicPostExecutionExample.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/httpcore5/src/test/java/org/apache/hc/core5/http/examples/ClassicPostExecutionExample.java b/httpcore5/src/test/java/org/apache/hc/core5/http/examples/ClassicPostExecutionExample.java
index fa79ae635..e574def45 100644
--- a/httpcore5/src/test/java/org/apache/hc/core5/http/examples/ClassicPostExecutionExample.java
+++ b/httpcore5/src/test/java/org/apache/hc/core5/http/examples/ClassicPostExecutionExample.java
@@ -106,7 +106,7 @@ public class ClassicPostExecutionExample {
final String requestUri = "/post";
for (int i = 0; i < requestBodies.length; i++) {
- final ClassicHttpRequest request = ClassicRequestBuilder.get()
+ final ClassicHttpRequest request = ClassicRequestBuilder.post()
.setHttpHost(target)
.setPath(requestUri)
.build();