Repository: ktorio/ktor
File: ktor-client/ktor-client-core/common/src/io/ktor/client/request/builders.kt (Kotlin)

Code before:

package io.ktor.client.request

import io.ktor.client.*
import io.ktor.client.statement.*
import io.ktor.http.*

/**
 * Executes an HTTP request using the provided [HttpRequestBuilder] configuration.
 *
 * This function sends a request with parameters specified in the [builder], allowing customization
 * of request settings such as URL, HTTP method, headers, and body.
 *
 * ## Usage Example
 * ```
 * val client = HttpClient()
 * val response = client.request {
 *     url("https://ktor.io")
 *     method = HttpMethod.Get
 * }
 * ```
 * This example demonstrates making a GET request to "https://ktor.io".
 *
 * ## Note
 * In addition to this generic `request` method, there are more specific extension functions, such as
 * [HttpClient.get], [HttpClient.post], HttpClient.put`, and `HttpClient.delete`, which are often more
 * convenient for common HTTP methods.
 *
 * @param builder The [HttpRequestBuilder] used to configure request parameters. Defaults to an empty
 * builder if none is provided.
 * @return [HttpResponse] The response received from the server after executing the request.
 *
 * For more details, see [Making requests](https://ktor.io/docs/request.html).
 */
public suspend inline fun HttpClient.request(
    builder: HttpRequestBuilder = HttpRequestBuilder()
): HttpResponse = HttpStatement(builder, this).execute()

/**
 * Prepares an [HttpClient]'s request with the parameters specified using [builder].
 */
public suspend inline fun HttpClient.prepareRequest(
    builder: HttpRequestBuilder = HttpRequestBuilder()
): HttpStatement = HttpStatement(builder, this)

/**
 * Executes an HTTP request using the provided [HttpRequestBuilder] configuration.
 *
 * This function sends a request with parameters specified in the [builder], allowing customization
 * of request settings such as URL, HTTP method, headers, and body.
 *

Review comment (suggestion):
```suggestion
 * [HttpClient.get], [HttpClient.post], [HttpClient.put], and [HttpClient.delete], which are often more
```

Code after:

package io.ktor.client.request

import io.ktor.client.*
import io.ktor.client.statement.*
import io.ktor.http.*

/**
 * Executes an HTTP request using the provided [HttpRequestBuilder] configuration.
 *
 * This function sends a request with parameters specified in the [builder], allowing customization
 * of request settings such as URL, HTTP method, headers, and body.
 *
 * ## Usage Example
 * ```
 * val client = HttpClient()
 * val response = client.request {
 *     url("https://ktor.io")
 *     method = HttpMethod.Get
 * }
 * ```
 * This example demonstrates making a GET request to "https://ktor.io".
 *
 * ## Note
 * In addition to this generic [HttpClient.request] method, there are more specific extension functions, such as
 * [HttpClient.get], [HttpClient.post], [HttpClient.put], and [HttpClient.delete], which are often more
 * convenient for common HTTP methods.
 *
 * @param builder The [HttpRequestBuilder] used to configure request parameters. Defaults to an empty
 * builder if none is provided.
 * @return [HttpResponse] The response received from the server after executing the request.
 *
 * For more details, see [Making requests](https://ktor.io/docs/request.html).
 */
public suspend inline fun HttpClient.request(
    builder: HttpRequestBuilder = HttpRequestBuilder()
): HttpResponse = HttpStatement(builder, this).execute()

/**
 * Prepares an [HttpClient]'s request with the parameters specified using [builder].
 */
public suspend inline fun HttpClient.prepareRequest(
    builder: HttpRequestBuilder = HttpRequestBuilder()
): HttpStatement = HttpStatement(builder, this)

/**
 * Executes an HTTP request using the provided [HttpRequestBuilder] configuration.
 *
 * This function sends a request with parameters specified in the [block], allowing customization
 * of request settings such as URL, HTTP method, headers, and body.
 *