Google Data APIs Client Library (1.41.1)



com.google.gdata.client.authn.oauth
Class OAuthHttpClient

java.lang.Object
  extended by com.google.gdata.client.authn.oauth.OAuthHttpClient

public class OAuthHttpClient
extends java.lang.Object

A simple client for making http requests and returning the response body. Uses HttpURLConnection to make http requests.


Constructor Summary
OAuthHttpClient()
           
 
Method Summary
 java.lang.String getResponse(java.net.URL url)
          Makes an http request to the input URL, and returns the response body as a string.
 java.lang.String getResponse(java.net.URL url, java.util.Map<java.lang.String,java.lang.String> headers)
          Makes an http request to the input URL, and returns the response body as a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OAuthHttpClient

public OAuthHttpClient()
Method Detail

getResponse

public java.lang.String getResponse(java.net.URL url)
                             throws OAuthException
Makes an http request to the input URL, and returns the response body as a string.

Parameters:
url - the url to make the request to
Returns:
the response body of the request
Throws:
OAuthException - if there was an error making the request

getResponse

public java.lang.String getResponse(java.net.URL url,
                                    java.util.Map<java.lang.String,java.lang.String> headers)
                             throws OAuthException
Makes an http request to the input URL, and returns the response body as a string.

Parameters:
url - the url to make the request to
headers - any headers to add to the request
Returns:
the response body of the request
Throws:
OAuthException - if there was an error making the request