Core/src/main/java/com/braintreepayments/api/internal/HttpClient.java
public void get(final String path, final HttpResponseCallback callback) {
        if (path == null) {
            postCallbackOnMainThread(callback, new IllegalArgumentException("Path cannot be null"));
            return;
        }

        final String url;
        if (path.startsWith("http")) {
            url = path;
        } else {
            url = mBaseUrl + path;
        }

        mThreadPool.submit(new Runnable() {
            @Override
            public void run() {
                HttpURLConnection connection = null;
                try {
                    connection = init(url);
                    connection.setRequestMethod(METHOD_GET);
                    postCallbackOnMainThread(callback, parseResponse(connection));
                } catch (Exception e) {
                    postCallbackOnMainThread(callback, e);
                } finally {
                    if (connection != null) {
                        connection.disconnect();
                    }
                }
            }
        });
    }
public void get(final String path, final HttpResponseCallback callback) {
        if (path == null) {
            postCallbackOnMainThread(callback, new IllegalArgumentException("Path cannot be null"));
            return;
        }

        final String url;
        if (path.startsWith("http")) {
            url = path;
        } else {
            url = mBaseUrl + path;
        }

        mThreadPool.submit(new Runnable() {
            @Override
            public void run() {
                HttpURLConnection connection = null;
                try {
                    connection = init(url);
                    connection.setRequestMethod(METHOD_GET);
                    postCallbackOnMainThread(callback, parseResponse(connection));
                } catch (Exception e) {
                    postCallbackOnMainThread(callback, e);
                } finally {
                    if (connection != null) {
                        connection.disconnect();
                    }
                }
            }
        });
    }
public void get ( final String path , final HttpResponseCallback callback ) { if ( path == null ) { postCallbackOnMainThread ( callback , new IllegalArgumentException ( "Path cannot be null" ) ) ; return ; } final String url ; if ( path . startsWith ( "http" ) ) { url = path ; } else { url = mBaseUrl + path ; } mThreadPool . submit ( new Runnable ( ) { @ Override public void run ( ) { HttpURLConnection connection = null ; try { connection = init ( url ) ; connection . setRequestMethod ( METHOD_GET ) ; postCallbackOnMainThread ( callback , parseResponse ( connection ) ) ; } catch ( Exception e ) { postCallbackOnMainThread ( callback , e ) ; } finally { if ( connection != null ) { connection . disconnect ( ) ; } } } } ) ; }
Make a HTTP GET request to using the base url and path provided. If the path is a full url,
it will be used instead of the previously provided base url.

@param path The path or url to request from the server via GET
@param callback The {@link HttpResponseCallback} to receive the response or error.
Make a HTTP GET request to using the base url and path provided . If the path is a full url it will be used instead of the previously provided base url .