com.braintreegateway.util
public class Http extends Object
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
Http.RequestMethod |
| Modifier and Type | Field and Description |
|---|---|
private String |
authorizationHeader |
private String |
baseMerchantURL |
private String[] |
certificateFilenames |
private String |
version |
| Constructor and Description |
|---|
Http(String authorizationHeader,
String baseMerchantURL,
String[] certificateFilenames,
String version) |
| Modifier and Type | Method and Description |
|---|---|
private HttpURLConnection |
buildConnection(Http.RequestMethod requestMethod,
String urlString) |
void |
delete(String url) |
NodeWrapper |
get(String url) |
private SSLSocketFactory |
getSSLSocketFactory() |
private NodeWrapper |
httpRequest(Http.RequestMethod requestMethod,
String url) |
private NodeWrapper |
httpRequest(Http.RequestMethod requestMethod,
String url,
String postBody) |
private static boolean |
isErrorCode(int responseCode) |
NodeWrapper |
post(String url) |
NodeWrapper |
post(String url,
Request request) |
NodeWrapper |
put(String url) |
NodeWrapper |
put(String url,
Request request) |
static void |
throwExceptionIfErrorStatusCode(int statusCode,
String message) |
private String authorizationHeader
private String baseMerchantURL
private String[] certificateFilenames
private String version
public void delete(String url)
public NodeWrapper get(String url)
public NodeWrapper post(String url)
public NodeWrapper post(String url, Request request)
public NodeWrapper put(String url)
public NodeWrapper put(String url, Request request)
private NodeWrapper httpRequest(Http.RequestMethod requestMethod, String url)
private NodeWrapper httpRequest(Http.RequestMethod requestMethod, String url, String postBody)
private SSLSocketFactory getSSLSocketFactory()
private HttpURLConnection buildConnection(Http.RequestMethod requestMethod, String urlString) throws IOException
IOExceptionpublic static void throwExceptionIfErrorStatusCode(int statusCode,
String message)
private static boolean isErrorCode(int responseCode)
Copyright © 2013-2014. All Rights Reserved.