public class SimpleHttpClientResponse extends Object implements HttpClientResponse
HttpClientResponse
that a script can receive from sending a
HttpClientRequest
over a HttpClient
.Constructor and Description |
---|
SimpleHttpClientResponse(Integer statusCode,
String reasonPhrase,
Map<String,String> headers,
String messageBody,
Map<String,String> cookies)
Creates a representation of an HTTP/1.1 response.
|
Modifier and Type | Method and Description |
---|---|
Map<String,String> |
getCookies()
Retrieve any cookies sent with the accessed resource.
|
String |
getEntity()
Retrieve the entity sent with the accessed resource.
|
Map<String,String> |
getHeaders()
Retrieve the headers sent with the accessed resource.
|
String |
getReasonPhrase()
Retrieve the reason phrase of the accessed resource.
|
Integer |
getStatusCode()
Retrieve the status code of the accessed resource.
|
boolean |
hasCookies()
Indicates if the accessed resource had cookies.
|
boolean |
hasHeaders()
Indicates if the accessed resource has headers.
|
public SimpleHttpClientResponse(Integer statusCode, String reasonPhrase, Map<String,String> headers, String messageBody, Map<String,String> cookies)
statusCode
- The three digit integer that corresponds to the HTTP status code.reasonPhrase
- The HTTP reason phrase.headers
- Any headers sent with the accessed resource.messageBody
- The entity sent with the accessed resource.cookies
- Any cookies sent with the accessed resource.public Integer getStatusCode()
getStatusCode
in interface HttpClientResponse
public String getReasonPhrase()
getReasonPhrase
in interface HttpClientResponse
public boolean hasHeaders()
hasHeaders
in interface HttpClientResponse
public Map<String,String> getHeaders()
getHeaders
in interface HttpClientResponse
public String getEntity()
getEntity
in interface HttpClientResponse
public boolean hasCookies()
hasCookies
in interface HttpClientResponse
public Map<String,String> getCookies()
getCookies
in interface HttpClientResponse
Copyright © 2010-2018, ForgeRock All Rights Reserved.