http作为最常用的网络请求方式,用来交换数据,不同的http客户端,性能使用方式都有所差别,本文将对HttpClient,okhttp,Jodd-http三者的put,post请求方式做一个对比。

 1         <dependency>
 2             <groupId>org.jodd</groupId>
 3             <artifactId>jodd-http</artifactId>
 4             <version>5.1.4</version>
 5         </dependency>
 6 
 7         <!-- https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp -->
 8         <dependency>
 9             <groupId>com.squareup.okhttp3</groupId>
10             <artifactId>okhttp</artifactId>
11             <version>4.4.0</version>
12         </dependency>
13 
14         <!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient -->
15         <dependency>
16             <groupId>org.apache.httpcomponents</groupId>
17             <artifactId>httpclient</artifactId>
18             <version>4.5.12</version>
19         </dependency>
20 
21         <!-- https://mvnrepository.com/artifact/com.alibaba/fastjson -->
22         <dependency>
23             <groupId>com.alibaba</groupId>
24             <artifactId>fastjson</artifactId>
25             <version>1.2.62</version>
26         </dependency>
27         
所需依赖

相关文章:

  • 2022-12-23
  • 2022-02-02
  • 2022-12-23
  • 2022-12-23
  • 2021-08-27
  • 2021-09-12
  • 2022-01-03
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-12
  • 2022-12-23
  • 2022-12-23
  • 2022-02-10
相关资源
相似解决方案