|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- Response type.public interface Request<T>
Request model for an HTTP request to the Heroku API. Intended for use with a Connection
.
Models an HTTP request relative to a base URL (e.g. https://api.heroku.com).
Method Summary | |
---|---|
String |
getBody()
Value of the request body. |
String |
getEndpoint()
Path and query parameters of a URL. |
Map<String,String> |
getHeaders()
Map of request-specific HTTP headers. |
Http.Method |
getHttpMethod()
HTTP method. |
T |
getResponse(byte[] bytes,
int status)
Response handler. |
Http.Accept |
getResponseType()
HTTP Accept header. |
boolean |
hasBody()
Whether or not the request has a body. |
Method Detail |
---|
Http.Method getHttpMethod()
String getEndpoint()
boolean hasBody()
String getBody()
UnsupportedOperationException
- Generally thrown if hasBody()
returns falseHttp.Accept getResponseType()
Http.Accept
Map<String,String> getHeaders()
Map
of request-specific HTTP headers.
T getResponse(byte[] bytes, int status)
bytes
- Data returned from the request.status
- HTTP status code.
T
as specified by an individual request.
RequestFailedException
- Generally thrown when the HTTP status code is 4XX.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |