doRequest

expect abstract suspend fun doRequest(client: HttpClient = QQGuildApi.DefaultHttpClient, server: Url, token: String, decoder: StringFormat = QQGuildApi.DefaultJsonDecoder): R(source)

使用此api发起一次请求,并得到预期中的结果。

Parameters

client

用于本次http请求的client。默认使用 QQGuildApi.DefaultHttpClient

server

请求目标服务器。See also: QQGuild.URLQQGuild.SANDBOX_URL

token

用于本次请求鉴权的token。

decoder

用于本次请求结果的反序列化器。不出意外的话应该是 Json 序列化器,默认使用 QQGuildApi.DefaultJsonDecoder

See also

Throws

see HttpClient.request, 可能会抛出任何ktor请求过程中的异常。

请求过程中出现了错误(http状态码 !in 200 .. 300)

actual abstract suspend fun doRequest(client: HttpClient, server: Url, token: String, decoder: StringFormat): R(source)

使用此api发起一次请求,并得到预期中的结果。

See also

Throws

see HttpClient.request, 可能会抛出任何ktor请求过程中的异常。

请求过程中出现了错误。

actual abstract suspend fun doRequest(client: HttpClient, server: Url, token: String, decoder: StringFormat): R(source)

使用此api发起一次请求,并得到预期中的结果。 *

See also

Throws

see HttpClient.request, 可能会抛出任何ktor请求过程中的异常。

请求过程中出现了错误。

actual abstract suspend fun doRequest(client: HttpClient, server: Url, token: String, decoder: StringFormat): R(source)

使用此api发起一次请求,并得到预期中的结果。如果返回了代表错误的响应值

See also

Throws

see HttpClient.request, 可能会抛出任何ktor请求过程中的异常。

请求过程中出现了错误。