🔮 simple request library by java8
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
.gitignore
.travis.yml
LICENSE
README.md
pom.xml

README.md

oh-my-request

HTTP request easier operation.

@biezhi on zhihu

Usage

Maven ArtifactId

<dependency>
    <groupId>io.github.biezhi</groupId>
    <artifactId>oh-my-request</artifactId>
    <version>0.0.1</version>
</dependency>

1. Get Request

String body = Request.get("https://github.com/opensearch.xml").body();
System.out.println(body);

2. Save To File

Request.get("https://avatars3.githubusercontent.com/u/3849072?v=3&s=460")
.receive(new File("D:/avatar.png"));

3. Post Request

Request.post("http://xxxx.com")
.form("name", "jack")
.body();

4. Headers

Request.get("http://xxxx.com")
.header("User-Agent", "Mozilla/5.0 (Windows NT 10.0; WOW64) xxxx")
.body();

License

Apache2