Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lightweight-component/aj-net
A Small HTTP Request Component
https://github.com/lightweight-component/aj-net
http-requests
Last synced: about 5 hours 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 (5 months ago)
- Default Branch: main
- Last Pushed: 2024-11-12T09:42:33.000Z (4 days ago)
- Last Synced: 2024-11-12T10:32:26.109Z (4 days ago)
- Topics: http-requests
- Language: Java
- Homepage:
- Size: 31.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Maven Central](https://img.shields.io/maven-central/v/com.ajaxjs/aj-net?label=Latest%20Release)](https://central.sonatype.com/artifact/com.ajaxjs/aj-net)
[![Javadoc](https://img.shields.io/badge/javadoc-1.4-brightgreen.svg?)](https://dev.ajaxjs.com/docs/javadoc/aj-net/)
[![License](https://img.shields.io/badge/license-Apache--2.0-green.svg?longCache=true&style=flat)](http://www.apache.org/licenses/LICENSE-2.0.txt)
[![Email](https://img.shields.io/badge/Contact--me-Email-orange.svg)](mailto:[email protected])
[![QQ群](https://framework.ajaxjs.com/static/qq.svg)](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(...);
```