- java.lang.Object
- 
- aeonics.util.Http
 
- 
 public class Http extends java.lang.ObjectSimple http request fetcher. The result is returned as data. If the response mime type wasapplication/json, then it is automatically decoded.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classHttp.ErrorRepresents an HTTP Error code with possibly a body response.
 - 
Field SummaryFields Modifier and Type Field Description static intCONNECT_TIMEOUTThe maximum number of milliseconds to wait before the connection is established.
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static Dataget(java.lang.String url)Fetches the specified resource using GETstatic Dataget(java.lang.String url, Data queryString)Fetches the specified resource using GETstatic Dataget(java.lang.String url, Data queryString, Data headers)Fetches the specified resource using GETstatic Dataget(java.lang.String url, Data queryString, Data headers, java.lang.String method)Fetches the specified resource using the provided method and include the parameters in the query string of the requeststatic Dataget(java.lang.String url, Data queryString, Data headers, java.lang.String method, int timeout)Fetches the specified resource using the provided method and include the parameters in the query string of the requeststatic Datapost(java.lang.String url)Fetches the specified resource using POSTstatic Datapost(java.lang.String url, Data body)Fetches the specified resource using POSTstatic Datapost(java.lang.String url, Data body, Data headers)Fetches the specified resource using POSTstatic Datapost(java.lang.String url, Data body, Data headers, java.lang.String method)Fetches the specified resource using the provided method and include the parameters in the body of the requeststatic Datapost(java.lang.String url, Data body, Data headers, java.lang.String method, int timeout)Fetches the specified resource using the provided method and include the parameters in the body of the request
 
- 
- 
- 
Method Detail- 
postpublic static Data post(java.lang.String url) Fetches the specified resource using POST- Parameters:
- url- the url
- Returns:
- the response
- Throws:
- Http.Error- if the remote endpoint returns an error (http code 400+)
 
 - 
postpublic static Data post(java.lang.String url, Data body) Fetches the specified resource using POST- Parameters:
- url- the url
- body- the content to send in key/value pairs
- Returns:
- the response
- Throws:
- Http.Error- if the remote endpoint returns an error (http code 400+)
 
 - 
postpublic static Data post(java.lang.String url, Data body, Data headers) Fetches the specified resource using POST- Parameters:
- url- the url
- body- the content to send in key/value pairs
- headers- the http request headers
- Returns:
- the response
- Throws:
- Http.Error- if the remote endpoint returns an error (http code 400+)
 
 - 
postpublic static Data post(java.lang.String url, Data body, Data headers, java.lang.String method) Fetches the specified resource using the provided method and include the parameters in the body of the request- Parameters:
- url- the url
- body- the content to send in key/value pairs
- headers- the http request headers
- method- the http method
- Returns:
- the response
- Throws:
- Http.Error- if the remote endpoint returns an error (http code 400+)
 
 - 
postpublic static Data post(java.lang.String url, Data body, Data headers, java.lang.String method, int timeout) Fetches the specified resource using the provided method and include the parameters in the body of the request- Parameters:
- url- the url
- body- the content to send in key/value pairs
- headers- the http request headers
- method- the http method
- timeout- the request timeout in milliseconds. 0 means infinite.
- Returns:
- the response
- Throws:
- Http.Error- if the remote endpoint returns an error (http code 400+)
 
 - 
getpublic static Data get(java.lang.String url) Fetches the specified resource using GET- Parameters:
- url- the url
- Returns:
- the response
- Throws:
- Http.Error- if the remote endpoint returns an error (http code 400+)
 
 - 
getpublic static Data get(java.lang.String url, Data queryString) Fetches the specified resource using GET- Parameters:
- url- the url
- queryString- the content to append to the url in key/value pairs
- Returns:
- the response
- Throws:
- Http.Error- if the remote endpoint returns an error (http code 400+)
 
 - 
getpublic static Data get(java.lang.String url, Data queryString, Data headers) Fetches the specified resource using GET- Parameters:
- url- the url
- queryString- the content to append to the url in key/value pairs
- headers- the http request headers
- Returns:
- the response
- Throws:
- Http.Error- if the remote endpoint returns an error (http code 400+)
 
 - 
getpublic static Data get(java.lang.String url, Data queryString, Data headers, java.lang.String method) Fetches the specified resource using the provided method and include the parameters in the query string of the request- Parameters:
- url- the url
- queryString- the content to append to the url in key/value pairs
- headers- the http request headers
- method- the http method
- Returns:
- the response
- Throws:
- Http.Error- if the remote endpoint returns an error (http code 400+)
 
 - 
getpublic static Data get(java.lang.String url, Data queryString, Data headers, java.lang.String method, int timeout) Fetches the specified resource using the provided method and include the parameters in the query string of the request- Parameters:
- url- the url
- queryString- the content to append to the url in key/value pairs
- headers- the http request headers
- method- the http method
- timeout- the request timeout in milliseconds. 0 means infinite.
- Returns:
- the response
- Throws:
- Http.Error- if the remote endpoint returns an error (http code 400+)
 
 
- 
 
-