net.oauth.http
Interface HttpClient

All Known Implementing Classes:
URLConnectionClient

public interface HttpClient

An HTTP client, which can send an HTTP request and receive the response.

Author:
jkristian

Field Summary
static java.lang.String CONNECT_TIMEOUT
          The name of the parameter that is the maximum time to wait to connect to the server.
static java.lang.String DELETE
           
static java.lang.String FOLLOW_REDIRECTS
          The name of the parameter to automatically follow redirects.
static java.lang.String GET
           
static java.lang.String POST
           
static java.lang.String PUT
           
static java.lang.String READ_TIMEOUT
          The name of the parameter that is the maximum time to wait for response data.
 
Method Summary
 HttpResponseMessage execute(HttpMessage request, java.util.Map<java.lang.String,java.lang.Object> httpParameters)
          Send an HTTP request and return the response.
 

Field Detail

CONNECT_TIMEOUT

static final java.lang.String CONNECT_TIMEOUT
The name of the parameter that is the maximum time to wait to connect to the server. (Integer msec)

See Also:
Constant Field Values

READ_TIMEOUT

static final java.lang.String READ_TIMEOUT
The name of the parameter that is the maximum time to wait for response data. (Integer msec)

See Also:
Constant Field Values

FOLLOW_REDIRECTS

static final java.lang.String FOLLOW_REDIRECTS
The name of the parameter to automatically follow redirects. (Boolean)

See Also:
Constant Field Values

GET

static final java.lang.String GET
See Also:
Constant Field Values

POST

static final java.lang.String POST
See Also:
Constant Field Values

PUT

static final java.lang.String PUT
See Also:
Constant Field Values

DELETE

static final java.lang.String DELETE
See Also:
Constant Field Values
Method Detail

execute

HttpResponseMessage execute(HttpMessage request,
                            java.util.Map<java.lang.String,java.lang.Object> httpParameters)
                            throws java.io.IOException
Send an HTTP request and return the response.

Parameters:
httpParameters - HTTP client parameters, as a map from parameter name to value. Parameter names are defined as constants below.
Throws:
java.io.IOException


Copyright © 2009. All Rights Reserved.