RequestBuilder

class RequestBuilder<T>(val route: Route<T>, keySize: Int = 2)(source)

Constructors

Link copied to clipboard
constructor(route: Route<T>, keySize: Int = 2)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val route: Route<T>

Functions

Link copied to clipboard

Sets the reason that will show up in the Discord Audit Log to reason for this request.

Link copied to clipboard
fun <E : Any> body(strategy: SerializationStrategy<E>, body: E)
Link copied to clipboard
fun build(): Request<*, T>
Link copied to clipboard
fun file(file: NamedFile)
fun file(name: String, contentProvider: ChannelProvider)
Link copied to clipboard
fun <T> RequestBuilder<T>.file(path: Path)
Link copied to clipboard
fun parameter(key: String, value: Snowflake)
fun parameter(key: String, value: Any)
Link copied to clipboard
operator fun MutableMap<Route.Key, String>.set(key: Route.Key, value: Snowflake)
operator fun MutableMap<String, String>.set(key: Route.Key, value: String)
Link copied to clipboard
fun unencodedHeader(key: String, value: String)

Adds a header without encoding its value.

Link copied to clipboard
fun urlEncodedHeader(key: String, value: String)

Adds a header and encodes its value as an URL query component.