Polishing
This commit is contained in:
@@ -1333,8 +1333,7 @@ public class HttpHeaders implements MultiValueMap<String, String>, Serializable
|
||||
*/
|
||||
@Override
|
||||
public void add(String headerName, String headerValue) {
|
||||
List<String> headerValues =
|
||||
this.headers.computeIfAbsent(headerName, k -> new LinkedList<>());
|
||||
List<String> headerValues = this.headers.computeIfAbsent(headerName, k -> new LinkedList<>());
|
||||
headerValues.add(headerValue);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2017 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.
|
||||
@@ -23,10 +23,12 @@ import java.util.List;
|
||||
import org.springframework.http.HttpMethod;
|
||||
|
||||
/**
|
||||
* Wrapper for a {@link ClientHttpRequestFactory} that has support for {@link ClientHttpRequestInterceptor}s.
|
||||
* {@link ClientHttpRequestFactory} wrapper with support for {@link ClientHttpRequestInterceptor}s.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @since 3.1
|
||||
* @see ClientHttpRequestFactory
|
||||
* @see ClientHttpRequestInterceptor
|
||||
*/
|
||||
public class InterceptingClientHttpRequestFactory extends AbstractClientHttpRequestFactoryWrapper {
|
||||
|
||||
@@ -45,6 +47,7 @@ public class InterceptingClientHttpRequestFactory extends AbstractClientHttpRequ
|
||||
this.interceptors = (interceptors != null ? interceptors : Collections.emptyList());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected ClientHttpRequest createRequest(URI uri, HttpMethod httpMethod, ClientHttpRequestFactory requestFactory) {
|
||||
return new InterceptingClientHttpRequest(requestFactory, this.interceptors, uri, httpMethod);
|
||||
|
||||
Reference in New Issue
Block a user