interface ClientRequest
Represents a typed, immutable, client-side HTTP request, as executed by the ExchangeFunction. Instances of this interface can be created via static builder methods.
Note that applications are more likely to perform requests through WebClient rather than using this directly.
Author
Brian Clozel
Author
Arjen Poutsma
Since
5.0
open fun attribute(name: String): Optional<Any>
Return the request attribute value if present. |
|
abstract fun attributes(): MutableMap<String, Any>
Return the attributes of this request. |
|
abstract fun body(): BodyInserter<*, in ClientHttpRequest>
Return the body inserter of this request. |
|
abstract fun cookies(): MultiValueMap<String, String>
Return the cookies of this request. |
|
open static fun from(other: ClientRequest): Builder
Create a builder with the method, URI, headers, and cookies of the given request. |
|
abstract fun headers(): HttpHeaders
Return the headers of this request. |
|
abstract fun method(): HttpMethod
Return the HTTP method. open static fun method(method: HttpMethod, url: URI): Builder
Create a builder with the given method and url. |
|
abstract fun url(): URI
Return the request URI. |
|
abstract fun writeTo(request: ClientHttpRequest, strategies: ExchangeStrategies): Mono<Void>
Writes this request to the given ClientHttpRequest. |