Class ResponseMetadata
java.lang.Object
org.gcube.informationsystem.resourceregistry.api.client.ResponseMetadata
Immutable HTTP response metadata captured before the connection is closed.
- Author:
- Luca Frosini (ISTI - CNR)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfirstHeaderValue(String name) headers()headerValues(String name) links()intwarnings()
-
Constructor Details
-
ResponseMetadata
Creates immutable response metadata.- Parameters:
statusCode- HTTP status codeheaders- response headers, preserving repeated valuesrequestUri- effective request URI, ornullwhen unavailable
-
-
Method Details
-
statusCode
public int statusCode()- Returns:
- the HTTP status code
-
headers
- Returns:
- the immutable case-insensitive multi-valued header map
-
headerValues
- Parameters:
name- header name- Returns:
- immutable values associated with the name
-
firstHeaderValue
- Parameters:
name- header name- Returns:
- the first value, when present
-
requestUri
- Returns:
- the effective request URI, when available
-
links
- Returns:
- all
Linkheader field values
-
contentLocation
- Returns:
- the
Content-Locationvalue, when present
-
preferenceApplied
- Returns:
- the
Preference-Appliedvalue, when present
-
warnings
- Returns:
- all
X-Warningheader field values
-
resultScopes
- Returns:
- recognized immutable
X-Result-Scopevalues
-