submitForm

inline suspend fun <reified T> HttpClient.submitForm(
    formParameters: Parameters = Parameters.Empty,
    encodeInQuery: Boolean = false,
    block: HttpRequestBuilder.() -> Unit = {}
): T
inline suspend fun <reified T> HttpClient.submitForm(
    scheme: String = "http",
    host: String = "localhost",
    port: Int = 80,
    path: String = "/",
    formParameters: Parameters = Parameters.Empty,
    encodeInQuery: Boolean = false,
    block: HttpRequestBuilder.() -> Unit = {}
): T

Submit formParameters request.

If encodeInQuery specified encode formParameters in url parameters and use HttpMethod.Get for the request. Otherwise send HttpMethod.Post request with formParameters encoded in body.

formParameters encoded using application/x-www-form-urlencoded format.

inline suspend fun <reified T> HttpClient.submitForm(
    url: String,
    formParameters: Parameters = Parameters.Empty,
    encodeInQuery: Boolean = false,
    block: HttpRequestBuilder.() -> Unit = {}
): T

Submit formParameters request.

If encodeInQuery specified encode formParameters in url parameters and use HttpMethod.Get for the request. Otherwise send HttpMethod.Post request with formParameters encoded in body.

url destination formParameters encoded using application/x-www-form-urlencoded format.