Package slash.navigation.rest
Class HttpRequest
java.lang.Object
slash.navigation.rest.HttpRequest
- Direct Known Subclasses:
Delete,Post,Put,ReadRequest
Wrapper for a simple HTTP Request.
- Author:
- Christian Pesch
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected void<T> Texecute(org.apache.hc.core5.http.io.HttpClientResponseHandler<T> responseHandler) protected StringList<org.apache.hc.core5.http.Header> intbooleanbooleanbooleanbooleanbooleanisOk()booleanbooleanbooleanbooleanprotected voidvoidsetResponseTimeoutSeconds(int seconds) voidsetUserAgent(String userAgent) protected boolean
-
Field Details
-
APPLICATION_JSON
- See Also:
-
-
Method Details
-
setUserAgent
-
setResponseTimeoutSeconds
public void setResponseTimeoutSeconds(int seconds) -
setHeader
-
disableContentCompression
protected void disableContentCompression() -
disableRedirectHandling
protected void disableRedirectHandling() -
throwsSocketExceptionIfUnAuthorized
protected boolean throwsSocketExceptionIfUnAuthorized() -
execute
public <T> T execute(org.apache.hc.core5.http.io.HttpClientResponseHandler<T> responseHandler) throws IOException - Throws:
IOException
-
executeAsString
- Throws:
IOException
-
getHeader
- Throws:
IOException
-
getHeaders
- Throws:
IOException
-
getStatusCode
- Throws:
IOException
-
isSuccessful
- Throws:
IOException
-
isOk
- Throws:
IOException
-
isNotModified
- Throws:
IOException
-
isPartialContent
- Throws:
IOException
-
isUnAuthorized
- Throws:
IOException
-
isForbidden
- Throws:
IOException
-
isNotFound
- Throws:
IOException
-
isBadRequest
- Throws:
IOException
-
isPreconditionFailed
- Throws:
IOException
-