https://github.com/lightweight-component/aj-net
A Small HTTP Request Component
https://github.com/lightweight-component/aj-net
http-requests
Last synced: 23 days ago
JSON representation
A Small HTTP Request Component
- Host: GitHub
- URL: https://github.com/lightweight-component/aj-net
- Owner: lightweight-component
- License: apache-2.0
- Created: 2024-06-12T11:58:56.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-12T09:42:33.000Z (8 months ago)
- Last Synced: 2025-01-16T21:25:08.303Z (6 months ago)
- Topics: http-requests
- Language: Java
- Homepage:
- Size: 32.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://central.sonatype.com/artifact/com.ajaxjs/aj-net)
[](https://dev.ajaxjs.com/docs/javadoc/aj-net/)
[](http://www.apache.org/licenses/LICENSE-2.0.txt)
[](mailto:[email protected])
[](https://shang.qq.com/wpa/qunwpa?idkey=3877893a4ed3a5f0be01e809e7ac120e346102bd550deb6692239bb42de38e22)# A Small HTTP Request Component / 轻量级 HTTP 请求组件
Tutorial: https://framework.ajaxjs.com/docs/aj/?section=net.
Java Documents: https://dev.ajaxjs.com/docs/javadoc/aj-net/.
# Install
Requires Java 1.8+, Maven Snippets:
```xml
com.ajaxjs
aj-net
1.4```
# Usage```java
// 请求百度网站,返回网站的 HTML 内容
String html = Get.get("https://www.baidu.com").toString();// POST Map 参数
String result = Post.post("http://localhost:8080/post.jsp", new HashMap() {
private static final long serialVersionUID = 1L;
{
put("foo", "bar");
}
});// POST 字符串参数
result = Post.post("http://localhost:8080/post", "a=1&b=2&c=3");// api
Post.api(...);
Post.apiXML(...);
```