Package org.javacord.api.util.auth
Interface Request
-
public interface Request
This class represents the originating request that led to a response that demands authentication.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default java.util.Optional<java.lang.String>
getBody()
The body of the request.default java.util.Map<java.lang.String,java.util.List<java.lang.String>>
getHeaders()
The headers of the request.default java.util.List<java.lang.String>
getHeaders(java.lang.String headerName)
The headers of the request with the given name.default java.lang.String
getMethod()
The method of the request.
-
-
-
Method Detail
-
getMethod
default java.lang.String getMethod()
The method of the request.- Returns:
- The method of the request.
-
getHeaders
default java.util.Map<java.lang.String,java.util.List<java.lang.String>> getHeaders()
The headers of the request.- Returns:
- The headers of the request.
-
getHeaders
default java.util.List<java.lang.String> getHeaders(java.lang.String headerName)
The headers of the request with the given name.- Parameters:
headerName
- The name of the header for which to return the values.- Returns:
- The headers of the request with the given name.
-
getBody
default java.util.Optional<java.lang.String> getBody() throws java.io.IOException
The body of the request.- Returns:
- The body of the request.
- Throws:
java.io.IOException
- If an IO error occurs.
-
-