HTTP

This Processing HTTP library makes it easy to communicate with servers on the Internet using the HTTP protocol- the same communications protocol used by web browsers like Internet Explorer, Firefox, Safari, and Chrome to surf the web.

In addition to serving web pages, HTTP is also used to provide direct access to data from a service provider through what is commonly called a "web services" API.

To get started, refer to the HttpClient documentation.

Download now from Github (http.zip)

See (and contribute!) examples on the wiki

HttpClient Class

The HttpClient class provides the interface for performing different types of HTTP requests against a particular server.

HttpClient
GET()
POST()

HttpRequest Class

An HttpRequest object represents a single HTTP request to a server.

HttpRequest

HttpResponse Class

An HttpResponse object contains both status information and the content of the response to an HTTP request.

HttpResponse
getContentAsJSONObject()
getContentAsString()
getContentAsXMLElement()

JSONObject Class

A JSONObject represents some data from a JSON response.

JSONObject
booleanValue()
doubleValue()
floatValue()
get()
intValue()
isBoolean()
isFloatingPoint()
isInteger()
isList()
isMap()
isNull()
isString()
longValue()
size()
stringValue()
toString()

Updated on Sat Oct 22 22:20:37 PDT 2011

Creative Commons License