public interface HttpRetrievalService
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_CACHE_AGE |
static int |
DEFAULT_MAX_DOWNLOAD_SIZE |
static String |
HTTP_INCLUDE_STACK_HEADER
Deprecated.
since 3.3 use
ResponseHeaderNames.STACK_DEPTH |
static int |
HTTP_INCLUDE_STACK_MAX_DEPTH |
static String |
HTTP_USER_AGENT_STRING |
Modifier and Type | Method and Description |
---|---|
HttpResponse |
get(HttpRequest request)
Retrieve a URL using custom HttpRequest settings
|
HttpResponse |
get(String url)
Retrieve a URL using the default HttpRequest settings for that URL.
|
Class[] |
getAvailableAuthenticators()
Retrieve the list of authenticators that can be used with this HttpRetrievalService
|
HttpRequest |
getDefaultRequestFor(String url)
Retrieve the default configured HttpRequest for a particular URL.
|
HttpRetrievalServiceConfig |
getHttpRetrievalServiceConfig()
Retrieve the configuration for this service
|
void |
setHttpRetrievalServiceConfig(HttpRetrievalServiceConfig config)
Overwrite the configuration for this service
|
static final int DEFAULT_MAX_DOWNLOAD_SIZE
static final int DEFAULT_MAX_CACHE_AGE
@Deprecated static final String HTTP_INCLUDE_STACK_HEADER
ResponseHeaderNames.STACK_DEPTH
static final int HTTP_INCLUDE_STACK_MAX_DEPTH
static final String HTTP_USER_AGENT_STRING
HttpResponse get(String url) throws IOException
get(service.getDefaultRequestFor(url));
url
- the URL to retrieveIOException
- if the retrieval failsHttpResponse get(HttpRequest request) throws IOException
request
- the request we want to makeIOException
- if the retrieval failsHttpRequest getDefaultRequestFor(String url)
url
- the URL that is going to be retrievedClass[] getAvailableAuthenticators()
HttpRetrievalServiceConfig getHttpRetrievalServiceConfig()
void setHttpRetrievalServiceConfig(HttpRetrievalServiceConfig config)
config
- the service configuration to saveCopyright © 2003–2015 Atlassian. All rights reserved.