public class ClientRequest extends Object
DiscordWebRequest.| Constructor and Description |
|---|
ClientRequest(DiscordWebRequest request)
Create a new
ClientRequest from the given request template. |
| Modifier and Type | Method and Description |
|---|---|
Object |
getBody()
Return the body to encode while processing this request.
|
String |
getDescription() |
DiscordWebRequest |
getDiscordRequest()
Return the original request template.
|
HttpHeaders |
getHeaders()
Return the headers of this request.
|
String |
getId()
Return this request's ID for correlation.
|
HttpMethod |
getMethod()
Return the HTTP method.
|
Route |
getRoute()
Return the API endpoint targeted by this request.
|
String |
getUrl()
Return the request URL.
|
String |
toString() |
public ClientRequest(DiscordWebRequest request)
ClientRequest from the given request template.request - the DiscordWebRequest templatepublic String getId()
public HttpMethod getMethod()
HttpMethod of this ClientRequestpublic String getUrl()
ClientRequestpublic HttpHeaders getHeaders()
HttpHeaders of this ClientRequest@Nullable public Object getBody()
nullpublic DiscordWebRequest getDiscordRequest()
DiscordWebRequest template that created this ClientRequestpublic Route getRoute()
Route requested by this ClientRequestpublic String getDescription()