HttpRequest
fun HttpRequest(method: HttpMethod, url: Url, configure: HttpRequest.Builder.() -> Unit = {}): HttpRequest(source)
Builds an HttpRequest for method and url with the optional parts set in configure.
Stable Core.
Return
the request.
Parameters
method
the method; not CONNECT.
url
the URL.
configure
sets the headers and the body; empty by default, for no headers and no body.
Throws
if the method is CONNECT, a header value is not sendable, a body is set on GET, HEAD or TRACE, or a body content type is combined with a Content-Type header.