request
Creates a new KtorHttpRequest instance.
This factory method creates a new request object that can be configured with URL, headers, parameters, and body before being sent.
Return
A new KtorHttpRequest instance.
Sends an HTTP request and returns the response.
This method takes a fully configured KtorHttpRequest, converts it to a Ktor request, executes it using the underlying Ktor client, and wraps the response in a KtorHttpResponse.
Return
The HTTP response wrapped in a KtorHttpResponse.
Parameters
The HTTP request to send. Must be a KtorHttpRequest instance.
Throws
if the request fails, times out, or encounters a network error.
Sends an HTTP request built with a builder lambda and returns the response.
This is the most convenient way to make HTTP requests. It creates a new request, applies the builder lambda to configure it, and then sends it.
Return
The HTTP response wrapped in a KtorHttpResponse.
Parameters
A lambda that configures the request using DSL syntax.
Throws
if the request fails, times out, or encounters a network error.