form

abstract fun form(formBuilder: MutableMap<String, String>.() -> Unit)

Sets the request body as form data with POST method.

This method sets the HTTP method to POST and the Content-Type to application/x-www-form-urlencoded. Multiple calls to this method will accumulate parameters rather than replacing them.

Parameters

formBuilder

A lambda that builds form parameters as a mutable map.