Introduce request attributes in RestClient

This commit introduces request attributes in the RestClient and
underlying infrastructure (i.e. HttpRequest).

Closes gh-32027
This commit is contained in:
Arjen Poutsma
2024-06-10 10:06:52 +02:00
parent c36e270481
commit 60b5bbe334
21 changed files with 385 additions and 9 deletions

View File

@@ -19,6 +19,7 @@ package org.springframework.web.reactive.function.client;
import java.net.InetSocketAddress;
import java.net.URI;
import java.nio.charset.StandardCharsets;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.OptionalLong;
@@ -324,6 +325,11 @@ class DefaultClientResponseTests {
public HttpHeaders getHeaders() {
return HttpHeaders.EMPTY;
}
@Override
public Map<String, Object> getAttributes() {
return Collections.emptyMap();
}
};
given(mockExchangeStrategies.messageReaders()).willReturn(