patch

inline fun patch(url: String, f: CustomHttpRequestBuilder.() -> Unit = {}): HttpRequest

Creates an HTTP PATCH request to the specified URL.

Return

The created HTTP PATCH request.

Example usage:

val request = patch("https://example.com") {
stringBody("Hello, world!")
}

val response: HttpResponse<String> = request.coSend(ofString)

Parameters

url

The URL for the HTTP request.

f

A lambda with receiver on CustomHttpRequestBuilder which allows to build the HTTP request.