Class RedirectingHttpClient
java.lang.Object
com.atlassian.httpclient.api.RedirectingHttpClient
- All Implemented Interfaces:
HttpClient
An HTTP Client which forwards all its method calls to another HTTP Client. Subclasses should override one or more
methods to modify the behavior of the backing HTTP Client as desired per the
decorator pattern.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructor for use by subclasses. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract HttpClientdelegate()voidflushCacheByUriPattern(Pattern uriPattern) Flush the cache entries by matching the URI using a regular expressionConstructs a new request.newRequest(String uri) Constructs a new Request with the specified URI.newRequest(String uri, String contentType, String entity) Constructs a new Request with the specified URI, contentType, and entity.newRequest(URI uri) Constructs a new Request with the specified URI.newRequest(URI uri, String contentType, String entity) Constructs a new Request with the specified URI, contentType, and entity.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface HttpClient
execute, transformation
-
Constructor Details
-
RedirectingHttpClient
protected RedirectingHttpClient()Constructor for use by subclasses.
-
-
Method Details
-
delegate
-
newRequest
Description copied from interface:HttpClientConstructs a new request. Sets the accept property to a default of "*/*".- Specified by:
newRequestin interfaceHttpClient- Returns:
- The new request object
-
newRequest
Description copied from interface:HttpClientConstructs a new Request with the specified URI. Sets the accept property to a default of "*/*".- Specified by:
newRequestin interfaceHttpClient- Parameters:
uri- The endpoint URI for this request- Returns:
- The new request object
-
newRequest
Description copied from interface:HttpClientConstructs a new Request with the specified URI. Sets the accept property to a default of "*/*".- Specified by:
newRequestin interfaceHttpClient- Parameters:
uri- The endpoint URI for this request- Returns:
- The new request object
-
newRequest
Description copied from interface:HttpClientConstructs 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.- Specified by:
newRequestin interfaceHttpClient- Parameters:
uri- The endpoint URI for this requestcontentType- A textual IANA media typeentity- A string entity to send as this request's message body- Returns:
- The new request object
-
newRequest
Description copied from interface:HttpClientConstructs 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.- Specified by:
newRequestin interfaceHttpClient- Parameters:
uri- The endpoint URI for this requestcontentType- A textual IANA media typeentity- A string entity to send as this request's message body- Returns:
- The new request object
-
flushCacheByUriPattern
Description copied from interface:HttpClientFlush the cache entries by matching the URI using a regular expression- Specified by:
flushCacheByUriPatternin interfaceHttpClient- Parameters:
uriPattern- The regular expression to match
-