public class BraintreeHttpClient
extends HttpClient
| Constructor and Description |
|---|
BraintreeHttpClient(Authorization authorization) |
| Modifier and Type | Method and Description |
|---|---|
void |
get(java.lang.String path,
HttpResponseCallback callback)
Make a HTTP GET request to Braintree using the base url, path and authorization provided.
|
static java.lang.String |
getUserAgent() |
protected java.net.HttpURLConnection |
init(java.lang.String url) |
protected java.lang.String |
parseResponse(java.net.HttpURLConnection connection) |
java.lang.String |
post(java.lang.String path,
java.lang.String data)
Makes a synchronous HTTP POST request to Braintree using the base url, path, and authorization provided.
|
void |
post(java.lang.String path,
java.lang.String data,
HttpResponseCallback callback)
Make a HTTP POST request to Braintree using the base url, path and authorization provided.
|
public BraintreeHttpClient(Authorization authorization)
public static java.lang.String getUserAgent()
String for the current SDK version.public void get(java.lang.String path,
HttpResponseCallback callback)
path - The path or url to request from the server via GETcallback - The HttpResponseCallback to receive the response or error.public void post(java.lang.String path,
java.lang.String data,
HttpResponseCallback callback)
path - The path or url to request from the server via HTTP POSTdata - The body of the POST requestcallback - The HttpResponseCallback to receive the response or error.public java.lang.String post(java.lang.String path,
java.lang.String data)
throws java.lang.Exception
path - the path or url to request from the server via HTTP POSTdata - the body of the post requestjava.lang.Exceptionpost(String, String, HttpResponseCallback)protected java.net.HttpURLConnection init(java.lang.String url)
throws java.io.IOException
java.io.IOExceptionprotected java.lang.String parseResponse(java.net.HttpURLConnection connection)
throws java.lang.Exception
java.lang.Exception