IHttpRequest Interface
public interface IHttpRequest
An HTTP request
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| default nativeRequestType |
getHttpRequest()
Returns the Request object to be executed |
| abstract nativeRequestType |
<requestBodyType,responseType,nativeRequestType>getHttpRequest(requestBodyType serializedObject)
Returns the Request object to be executed |
| abstract void |
addHeader(String header, String value)
Adds a header to this request |
| abstract long |
getDelay()
Gets delay between retries |
|
abstract
java.util.List<Header |
getHeaders()
Gets the headers |
|
abstract
Http |
getHttpMethod()
Gets the HTTP method |
| abstract int |
getMaxRedirects()
Gets the max redirects |
| abstract int |
getMaxRetries()
Gets max retries |
| abstract java.util.List<Option> |
getOptions()
Gets the options |
| abstract java.net.URL |
getRequestUrl()
Gets the request URL |
|
abstract
IShould |
getShouldRedirect()
Gets the should redirect callback |
|
abstract
IShould |
getShouldRetry()
Gets the should retry callback |
| abstract boolean |
getUseCaches()
Gets use |
| abstract void |
setDelay(long delay)
Sets the delay in seconds between retires |
| abstract void |
setMaxRedirects(int maxRedirects)
Sets the max redirects |
| abstract void |
setMaxRetries(int maxRetries)
Sets the max retries |
| abstract void |
setShouldRedirect(IShouldRedirect shouldRedirect)
Sets the should redirect callback |
| abstract void |
setShouldRetry(IShouldRetry shouldretry)
Sets the should retry callback |
| abstract void |
setUseCaches(boolean useCaches)
Sets use |
|
abstract
IHttp |
withHttpMethod(HttpMethod httpMethod)
Sets the HTTP method and returns the current request |
Method Details
getHttpRequest
public default nativeRequestType
Returns the Request object to be executed
Returns:
Throws:
<requestBodyType,responseType,nativeRequestType>getHttpRequest
public abstract nativeRequestType
Returns the Request object to be executed
Parameters:
Returns:
Throws:
addHeader
public abstract void addHeader(String header, String value)
Adds a header to this request
Parameters:
getDelay
public abstract long getDelay()
Gets delay between retries
Returns:
getHeaders
public abstract List
Gets the headers
Returns:
getHttpMethod
public abstract HttpMethod getHttpMethod()
Gets the HTTP method
Returns:
getMaxRedirects
public abstract int getMaxRedirects()
Gets the max redirects
Returns:
getMaxRetries
public abstract int getMaxRetries()
Gets max retries
Returns:
getOptions
public abstract List
Gets the options
Returns:
getRequestUrl
public abstract URL getRequestUrl()
Gets the request URL
Returns:
getShouldRedirect
public abstract IShouldRedirect getShouldRedirect()
Gets the should redirect callback
Returns:
getShouldRetry
public abstract IShouldRetry getShouldRetry()
Gets the should retry callback
Returns:
getUseCaches
public abstract boolean getUseCaches()
Gets useCaches parameter
Returns:
setDelay
public abstract void setDelay(long delay)
Sets the delay in seconds between retires
Parameters:
setMaxRedirects
public abstract void setMaxRedirects(int maxRedirects)
Sets the max redirects
Parameters:
setMaxRetries
public abstract void setMaxRetries(int maxRetries)
Sets the max retries
Parameters:
setShouldRedirect
public abstract void setShouldRedirect(IShouldRedirect shouldRedirect)
Sets the should redirect callback
Parameters:
setShouldRetry
public abstract void setShouldRetry(IShouldRetry shouldretry)
Sets the should retry callback
Parameters:
setUseCaches
public abstract void setUseCaches(boolean useCaches)
Sets useCaches parameter to cache the response
Parameters:
withHttpMethod
public abstract IHttpRequest withHttpMethod(HttpMethod httpMethod)
Sets the HTTP method and returns the current request
Parameters:
Returns: