最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【已解决】Java中找到好用的Http网络库

Java crifan 1484浏览 0评论
折腾:
【未解决】Mac中搭建Java开发环境
期间,需要,也先去找找,Java中好用的Http的网络库。
最好要好用,且支持cookie等稍微高级一点的功能
java network library
java 网络库 类似于python requests
PvdBerg1998/PNet: High level Java network library
Java Networking
Is there a good Java networking library? – Stack Overflow
android – Networking library compatible C and Java – Stack Overflow
High level Java network library : programminghttps://www.reddit.com/r/programming/comments/64dp8c/high_level_java_network_library/
[P] A neural network implementation in Java (ICS3U/4U) : MachineLearning
patricksongzy/neural-net: A neural network implementation in java.
java 实现类似于python requests包的Session类,自动管理cookie。 – 北风之神0509 – 博客园
2、java的OkHttp3默认是不自动管理cookie。
okhttp3
JAVA实现Python requests模块(JAVA实现Http请求) – 酒肉猿 – CSDN博客
hsiafan/requests: Convenient http client for java, inspired by python request module
  • Star:307
看起来是我需要的
java http lib like python requests
is there an equivalent to python’s request module in Java for working on REST based App – Stack Overflow
Unirest for Java – Simplified, lightweight HTTP Request Library
看起来不错,但是没有说cookie或session
jkcclemens/khttp: Kotlin HTTP requests library. Similar to Python requests.
  • Star:244
看起来,貌似像是作者说的,比Unirest更好用?
不过貌似是Kotlin的,不是纯java的
此处虽然希望是java的,但是如果可以用更新的kotlin,也不是不可以
不过此处IntelliJ 希望能支持Kotlin
Recommendations for Java http client libraries? : java
最古老的:
HttpClient – HttpClient Home
后继者:
Apache HttpComponents – HttpComponents HttpClient Overview
  • UrlConnection
  • Java 9’s new HttpClient
  • Apache Commons HttpClient
  • Unirest:基于HttpClient
  • OkHttp
    • 据说:OkHttp,虽然还可以,但是对于SSL支持的很差?
hsiafan/requests: Convenient http client for java, inspired by python request module
貌似不错?
暂时就用这个吧。
【总结】
目前看来有几个可能性:
暂时先去试试:requests
待后续看看是否真的好用。
后来从:
Recommendations for Java http client libraries? : java
We use OkHttp in our microservices extensively. We use it for both internal and external calls and both synchronously (most calls) and asynchronously (few special cases).
It’s easy to use with a clean API.
看到:
OkHttp
http://square.github.io/okhttp/
-》
square/okhttp: An HTTP+HTTP/2 client for Android and Java applications.
然后发现:竟然Star有 29000+
-》前面几个star只有几十。。。
那毋庸置疑,还是先去用:OkHttp 吧。

转载请注明:在路上 » 【已解决】Java中找到好用的Http网络库

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
83 queries in 0.441 seconds, using 22.05MB memory