Package io.wcm.caravan.io.http.response
Class CaravanHttpResponse
- java.lang.Object
-
- io.wcm.caravan.io.http.response.CaravanHttpResponse
-
@ProviderType public final class CaravanHttpResponse extends Object
An immutable response to an http invocation which only returns string content.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Body
body()
if present, the response had a bodyMap<String,String>
getCacheControl()
Collects all "Cache-Control" directives from the response headers into a single map.com.google.common.collect.Multimap<String,String>
headers()
String
reason()
int
status()
status code.String
toString()
-
-
-
Method Detail
-
status
public int status()
status code. ex200
See rfc2616- Returns:
- HTTP status code
-
reason
public String reason()
- Returns:
- HTTP status reason
-
getCacheControl
public Map<String,String> getCacheControl()
Collects all "Cache-Control" directives from the response headers into a single map. The keys in the map are the directive names (e.g. "max-age", "no-cache"), and everything after the "=" is taken as value. For directives that don't have a value "true" is used as a value instead.- Returns:
- the map of Cache-Control directice
-
body
public Body body()
if present, the response had a body- Returns:
- HTTP body
-
-