Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.web.reactive.function.client;
import java.net.URI;
import java.util.Map;
import java.util.Optional;
import java.util.function.Consumer;
import org.reactivestreams.Publisher;
import reactor.core.publisher.Mono;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.client.reactive.ClientHttpRequest;
import org.springframework.util.MultiValueMap;
import org.springframework.web.reactive.function.BodyInserter;
/**
* Represents a typed, immutable, client-side HTTP request, as executed by the
* {@link ExchangeFunction}. Instances of this interface can be created via static
* builder methods.
*
*
Note that applications are more likely to perform requests through
* {@link WebClient} rather than using this directly.
*
* @author Brian Clozel
* @author Arjen Poutsma
* @since 5.0
*/
public interface ClientRequest {
/**
* Name of {@link #attributes() attribute} whose value can be used to
* correlate log messages for this request. Use {@link #logPrefix()} to
* obtain a consistently formatted prefix based on this attribute.
* @since 5.1
* @see #logPrefix()
*/
String LOG_ID_ATTRIBUTE = ClientRequest.class.getName() + ".LOG_ID";
/**
* Return the HTTP method.
*/
HttpMethod method();
/**
* Return the request URI.
*/
URI url();
/**
* Return the headers of this request.
*/
HttpHeaders headers();
/**
* Return the cookies of this request.
*/
MultiValueMap cookies();
/**
* Return the body inserter of this request.
*/
BodyInserter body();
/**
* Return the request attribute value if present.
* @param name the attribute name
* @return the attribute value
*/
default Optional