public class JSONHTTPRequest extends Object
Modifier and Type | Method and Description |
---|---|
static Callable<Object> |
make(String url,
JSONLiteral request)
Produce a task that will make an HTTP POST request to an external URL,
wait for the reponse, parse the response as JSON, and return the parsed
response as the product of the task.
|
static Callable<Object> |
make(String url,
JSONObject request)
Produce a task that will make an HTTP POST request to an external URL,
wait for the reponse, parse the response as JSON, and return the parsed
response as the product of the task.
|
public static Callable<Object> make(String url, JSONLiteral request)
url
- The URL to issue the HTTP request to.request
- A JSON literal containing the request body to be posted.public static Callable<Object> make(String url, JSONObject request)
url
- The URL to issue the HTTP request to.request
- A JSON object containing the request body to be posted.Copyright © 2017. All rights reserved.