Package discord4j.rest.http.client
Class ClientRequest
java.lang.Object
discord4j.rest.http.client.ClientRequest
An adapted request definition from an original
DiscordWebRequest
.-
Constructor Summary
ConstructorDescriptionClientRequest
(DiscordWebRequest request) Create a newClientRequest
from the given request template. -
Method Summary
Modifier and TypeMethodDescriptiongetBody()
Return the body to encode while processing this request.Return the original request template.Return the headers of this request.getId()
Return this request's ID for correlation.Return the HTTP method.getRoute()
Return the API endpoint targeted by this request.getUrl()
Return the request URL.toString()
-
Constructor Details
-
ClientRequest
Create a newClientRequest
from the given request template.- Parameters:
request
- theDiscordWebRequest
template
-
-
Method Details
-
getId
Return this request's ID for correlation.- Returns:
- this request's ID
-
getMethod
Return the HTTP method.- Returns:
- the
HttpMethod
of thisClientRequest
-
getUrl
Return the request URL.- Returns:
- the request URL for this
ClientRequest
-
getHeaders
Return the headers of this request.- Returns:
- the
HttpHeaders
of thisClientRequest
-
getBody
Return the body to encode while processing this request.- Returns:
- the request body, can be
null
-
getDiscordRequest
Return the original request template.- Returns:
- the
DiscordWebRequest
template that created thisClientRequest
-
getRoute
Return the API endpoint targeted by this request.- Returns:
- the
Route
requested by thisClientRequest
-
getDescription
-
getAuthorizationScheme
-
getAuthorizationValue
-
toString
-