jerry-http library makes it possible to make internet calls super-easy. All calls return a WebResponse object that has many utility methods to work with. Most of the HTML/CSS/JS resource calls, or REST calls are now a single line of code away.

Let’s see the details in the following example:

// fetch the response from
WebResponse response = WebInvoker.getResponse("");

// check if we could connect to the server
if(response == null) {
	// could not connect - either no internet, or no host

if(!response.isSuccess()) {
	// we received an HTTP error code: 4xx or 5xx

// get string contents in encoding specified
String content = response.getContent();

// get byte-array
byte[] bytes = response.asBytes();

More examples are detailed below.

The library is tested on the following JDK versions:

  • Oracle JDK 8
  • Oracle JDK 7
  • Open JDK 7


GET a WebResponse from

WebResponse response = WebInvoker.getResponse("");


The library is released under the terms of Apache Public License Version 2.

Fork me on GitHub