Package org.javacord.api.util.auth
Interface Request
-
public interface RequestThis 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 Optional<String>getBody()The body of the request.default Map<String,List<String>>getHeaders()The headers of the request.default List<String>getHeaders(String headerName)The headers of the request with the given name.default StringgetMethod()The method of the request.
-
-
-
Method Detail
-
getMethod
default String getMethod()
The method of the request.- Returns:
- The method of the request.
-
getHeaders
default Map<String,List<String>> getHeaders()
The headers of the request.- Returns:
- The headers of the request.
-
getHeaders
default List<String> getHeaders(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 Optional<String> getBody() throws IOException
The body of the request.- Returns:
- The body of the request.
- Throws:
IOException- If an IO error occurs.
-
-