Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Konloch committed Feb 15, 2023
1 parent 13be828 commit cfc6dcd
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,28 @@
# HTTPRequest
This is a very simple HTTPRequest wrapper.
HTTPRequest is an easy-to-use zero dependency Java wrapper to read from a URL.

Supports defining cookies, proxies, post data, and custom useragents.
Support for Cookies, proxies, UserAgent, post data and more.

## Example Usage:
## How To Add As Library
Add it as a maven dependecy or just [download the latest release](https://github.com/Konloch/HTTPRequest/releases).
```xml
<dependency>
<groupId>com.konloch</groupId>
<artifactId>HTTPRequest</artifactId>
<version>2.0.0</version>
</dependency>
```

## How To Use
**Simple Request:**
```java
HTTPRequest request = new HTTPRequest(new URL("http://the.bytecode.club/"));
HTTPRequest request = new HTTPRequest(new URL("https://google.com/"));
String[] webpage = request.read();
```

**Complex Request:**
**Advanced Request:**
```java
HTTPRequest request = new HTTPRequest(new URL("http://the.bytecode.club/"));
HTTPRequest request = new HTTPRequest(new URL("https://google.com/"));
request.setTimeout(10000);
request.setPostData("postdata=yes&awesome=yup");
request.setReferer("http://google.com/");
Expand Down

0 comments on commit cfc6dcd

Please sign in to comment.