Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

divroll/HttpClient

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

HttpClient

A fluent HTTP client for Java/TeaVM.

Example Usage

PostRequest request =
    new PostRequest("http://httpbin.org/post", new HttpStringBody("hello world"));
HttpResponse<InputStream> response = HttpClient.post(request);
InputStream body = response.getBody();

or

InputStream inputStream = createStream();
PostRequest request =
    new PostRequest("http://httpbin.org/post", new HttpInputStreamBody(inputStream));
HttpResponse<String> response = HttpClient.post(request);
String body = response.getBody();

Setup with Maven

mvn clean install

Add dependency

<dependency>
   <groupId>com.divroll</groupId>
   <artifactId>httpclient</artifactId>
   <version>SNAPSHOT</version>
</dependency>

Run test

mvn test -Dteavm.junit.target=target/js-tests -Dteavm.junit.js.runner=htmlunit -Dteavm.junit.js.threads=2

About

A fluent HTTP Client for TeaVM (and Javascript soon!)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.