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
ConstructorsConstructorDescriptionClientRequest(DiscordWebRequest request) Create a newClientRequestfrom 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 newClientRequestfrom the given request template.- Parameters:
request- theDiscordWebRequesttemplate
-
-
Method Details
-
getId
Return this request's ID for correlation.- Returns:
- this request's ID
-
getMethod
Return the HTTP method.- Returns:
- the
HttpMethodof thisClientRequest
-
getUrl
Return the request URL.- Returns:
- the request URL for this
ClientRequest
-
getHeaders
Return the headers of this request.- Returns:
- the
HttpHeadersof 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
DiscordWebRequesttemplate that created thisClientRequest
-
getRoute
Return the API endpoint targeted by this request.- Returns:
- the
Routerequested by thisClientRequest
-
getDescription
-
getAuthorizationScheme
-
getAuthorizationValue
-
toString
-