body

open fun body(body: Any?): CustomOneBotApiBuilder<T>(source)

提供请求体。


abstract var body: Any?(source)

请求体,在非 Get 请求时使用。

body 的类型可以是:

如果 method 是 HttpMethod.Get,body 必须为 null,否则会抛出 IllegalArgumentException。

Throws

如果在 method 为 HttpMethod.Get 时 设置非 null 值