request

fun Klopik.Companion.request(method: Method, url: String, options: RequestOptions.() -> Unit = {}): Request

Creates a request to the specified URL with the specified method and options.

Return

A Request object representing the HTTP request.

Parameters

method

The HTTP method to use for the request. This is an instance of the Method enum.

url

The URL to send the request to.

options

A lambda function with the request options. This object is used to specify the body, headers and other request parameters (optional).