Package com.veeva.vault.sdk.api.http
Interface HttpResponse<T>
- Type Parameters:
T
- type of object that the response body is converted to
public interface HttpResponse<T>
Represents an HTTP request execution response.
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves a list of HTTP response header names.getHeaderValues
(String name) Retrieves a list of HTTP response header values for the given header name.int
Retrieves the HTTP status code.Retrieves the HTTP response body.
-
Method Details
-
getHttpStatusCode
int getHttpStatusCode()Retrieves the HTTP status code.- Returns:
- HTTP status code, for example, 200
-
getHeaderNames
Retrieves a list of HTTP response header names.- Returns:
- non-null List of header names
-
getHeaderValues
Retrieves a list of HTTP response header values for the given header name.- Parameters:
name
- name of header to get values for. Cannot be null or empty.- Returns:
- non-null list of header values
-
getResponseBody
T getResponseBody()Retrieves the HTTP response body.- Returns:
- HTTP response body, or null if no response body is present
-