public class

OAuthHttpClient

extends Object
java.lang.Object
   ↳ com.google.gdata.client.authn.oauth.OAuthHttpClient

Class Overview

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

Summary

Public Constructors
OAuthHttpClient()
Public Methods
String getResponse(URL url, Map<String, String> headers)
Makes an http request to the input URL, and returns the response body as a string.
String getResponse(URL url)
Makes an http request to the input URL, and returns the response body as a string.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public OAuthHttpClient ()

Public Methods

public String getResponse (URL url, Map<String, String> headers)

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

public String getResponse (URL url)

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