com.atlassian.httpclient.api
Interface HttpClient

All Known Implementing Classes:
ForwardingHttpClient

public interface HttpClient

A service providing asynchronous HTTP request creation and execution. To use this service, first create a Request instance with one of the newRequest() methods. Then, populate the request with any additional options, and finally call one of its HTTP verb methods to execute the request. See the Request class for finer control over the construction of the HTTP requests to be executed.


Method Summary
 void flushCacheByUriPattern(java.util.regex.Pattern uriPattern)
          Flush the cache entries by matching the URI using a regular expression
 Request newRequest()
          Constructs a new request.
 Request newRequest(java.lang.String uri)
          Constructs a new Request with the specified URI.
 Request newRequest(java.lang.String uri, java.lang.String contentType, java.lang.String entity)
          Constructs a new Request with the specified URI, contentType, and entity.
 Request newRequest(java.net.URI uri)
          Constructs a new Request with the specified URI.
 Request newRequest(java.net.URI uri, java.lang.String contentType, java.lang.String entity)
          Constructs a new Request with the specified URI, contentType, and entity.
 

Method Detail

newRequest

Request newRequest()
Constructs a new request. Sets the accept property to a default of "*/*".

Returns:
The new request object

newRequest

Request newRequest(java.net.URI uri)
Constructs a new Request with the specified URI. Sets the accept property to a default of "*/*".

Parameters:
uri - The endpoint URI for this request
Returns:
The new request object

newRequest

Request newRequest(java.lang.String uri)
Constructs a new Request with the specified URI. Sets the accept property to a default of "*/*".

Parameters:
uri - The endpoint URI for this request
Returns:
The new request object

newRequest

Request newRequest(java.net.URI uri,
                   java.lang.String contentType,
                   java.lang.String entity)
Constructs a new Request with the specified URI, contentType, and entity. Sets the accept property to a default of "*/*", and the content charset property to "UTF-8". This should only be used for sending textual content types, typically via the POST or PUT HTTP methods.

Parameters:
uri - The endpoint URI for this request
contentType - A textual IANA media type
entity - A string entity to send as this request's message body
Returns:
The new request object

newRequest

Request newRequest(java.lang.String uri,
                   java.lang.String contentType,
                   java.lang.String entity)
Constructs a new Request with the specified URI, contentType, and entity. Sets the accept property to a default of "*/*", and the content charset property to "UTF-8". This should only be used for sending textual content types, typically via the POST or PUT HTTP methods.

Parameters:
uri - The endpoint URI for this request
contentType - A textual IANA media type
entity - A string entity to send as this request's message body
Returns:
The new request object

flushCacheByUriPattern

void flushCacheByUriPattern(java.util.regex.Pattern uriPattern)
Flush the cache entries by matching the URI using a regular expression

Parameters:
uriPattern - The regular expression to match


Copyright © 2012-2013 Atlassian. All Rights Reserved.