Package org.nuxeo.http.test
Class HttpResponse
java.lang.Object
org.nuxeo.http.test.HttpResponse
- Direct Known Subclasses:
CloseableHttpResponse
- Since:
- 2023.13
-
Field Summary
Modifier and TypeFieldDescriptionprotected final org.apache.http.client.methods.CloseableHttpResponse
protected CloningInputStream
-
Constructor Summary
ModifierConstructorDescriptionprotected
HttpResponse
(org.apache.http.client.methods.CloseableHttpResponse response) -
Method Summary
Modifier and TypeMethodDescriptiongetFirstHeader
(String headerName) getOptFirstHeader
(String headerName) protected Optional<CloningInputStream>
int
getType()
-
Field Details
-
response
protected final org.apache.http.client.methods.CloseableHttpResponse response -
responseStream
-
-
Constructor Details
-
HttpResponse
protected HttpResponse(org.apache.http.client.methods.CloseableHttpResponse response)
-
-
Method Details
-
getStatus
public int getStatus()- Returns:
- the HTTP status code
-
getLocation
- Returns:
- the
Location
header value, if any
-
getType
- Returns:
- the
Content-Type
header value, if any
-
getOptFirstHeader
- Returns:
- the header value
-
getFirstHeader
- Returns:
- the header value, if any
-
getEntityInputStream
- Returns:
- the entity body as
InputStream
-
getEntityString
- Returns:
- the entity body as
String
-
getResponseStream
- Throws:
IOException
-