public abstract class AbstractHttpFetcher extends Object implements HttpFetcher
Constructor and Description |
---|
AbstractHttpFetcher() |
Modifier and Type | Method and Description |
---|---|
HttpResponse |
get(String url)
GETs a HTTP URL.
|
abstract HttpResponse |
get(String url,
HttpRequestOptions requestOptions)
GETs a HTTP URL.
|
HttpRequestOptions |
getDefaultRequestOptions()
Returns the default
HttpRequestOptions . |
HttpRequestOptions |
getRequestOptions()
Gets a clone of the default HttpRequestOptions.
|
HttpResponse |
head(String url) |
abstract HttpResponse |
head(String url,
HttpRequestOptions requestOptions) |
HttpResponse |
post(String url,
Map<String,String> parameters) |
abstract HttpResponse |
post(String url,
Map<String,String> parameters,
HttpRequestOptions requestOptions) |
void |
setDefaultRequestOptions(HttpRequestOptions defaultOptions) |
public HttpResponse get(String url) throws IOException
HttpFetcher
get
in interface HttpFetcher
url
- The HTTP URL to GET.IOException
HttpResponse
public abstract HttpResponse get(String url, HttpRequestOptions requestOptions) throws IOException
HttpFetcher
get
in interface HttpFetcher
url
- The HTTP URL to GET.IOException
HttpRequestOptions, HttpResponse
public HttpRequestOptions getDefaultRequestOptions()
HttpFetcher
HttpRequestOptions
. Note that this does
not return a clone, so manipulating the object returned here will
manipulate the HttpRequestOptions
used by the HttpFetcher
.getDefaultRequestOptions
in interface HttpFetcher
public HttpRequestOptions getRequestOptions()
HttpFetcher
getRequestOptions
in interface HttpFetcher
public HttpResponse head(String url) throws IOException
head
in interface HttpFetcher
IOException
public abstract HttpResponse post(String url, Map<String,String> parameters, HttpRequestOptions requestOptions) throws IOException
post
in interface HttpFetcher
IOException
public HttpResponse post(String url, Map<String,String> parameters) throws IOException
post
in interface HttpFetcher
IOException
public abstract HttpResponse head(String url, HttpRequestOptions requestOptions) throws IOException
head
in interface HttpFetcher
IOException
public void setDefaultRequestOptions(HttpRequestOptions defaultOptions)
setDefaultRequestOptions
in interface HttpFetcher
Copyright © 2017 Sxip. All rights reserved.