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/17 09:36:16 UTC

[httpcomponents-core] branch master updated: 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 master
in repository https://gitbox.apache.org/repos/asf/httpcomponents-core.git


The following commit(s) were added to refs/heads/master by this push:
     new b26a55907 The official document POST example incorrectly calls the GET method. For beginners, it is necessary to revise
b26a55907 is described below

commit b26a559078d15dc00e387eea4b824391e3bef590
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();