Upgrade to 10.7.0. (#270)

This commit is contained in:
Olga Maciaszek-Sharma
2020-01-07 16:12:14 +01:00
committed by GitHub
parent 41e9b55869
commit 8aa4729537
8 changed files with 9 additions and 25 deletions

View File

@@ -123,11 +123,6 @@
<artifactId>feign-okhttp</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-java8</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.netflix.hystrix</groupId>
<artifactId>hystrix-core</artifactId>

View File

@@ -73,7 +73,7 @@ public class FeignBlockingLoadBalancerClient implements Client {
String reconstructedUrl = loadBalancerClient.reconstructURI(instance, originalUri)
.toString();
Request newRequest = Request.create(request.httpMethod(), reconstructedUrl,
request.headers(), request.requestBody());
request.headers(), request.requestBody().asBytes(), request.charset());
return delegate.execute(newRequest, options);
}

View File

@@ -134,7 +134,7 @@ public class FeignLoadBalancer extends
Map<String, Collection<String>> headers = new LinkedHashMap<>(
request.headers());
return Request.create(request.httpMethod(), getUri().toASCIIString(), headers,
request.requestBody());
request.requestBody().asBytes(), request.charset());
}
Request toRequest() {

View File

@@ -130,8 +130,7 @@ class FeignBlockingLoadBalancerClientTests {
private Request testRequest(String host) {
return Request.create(Request.HttpMethod.GET, "http://" + host + "/path",
testHeaders(),
Request.Body.encoded("hello".getBytes(), StandardCharsets.UTF_8));
testHeaders(), "hello".getBytes(), StandardCharsets.UTF_8);
}
private Map<String, Collection<String>> testHeaders() {

View File

@@ -159,7 +159,7 @@ public class FeignLoadBalancerTests {
@Test
public void testRibbonRequestURLEncode() throws Exception {
String url = "https://foo/?name=%7bcookie"; // name={cookie
Request request = Request.create(GET, url, new HashMap<>(), null, null);
Request request = Request.create(GET, url, new HashMap<>(), null, null, null);
assertThat(request.url()).isEqualTo(url);

View File

@@ -44,13 +44,12 @@ public class RibbonResponseStatusCodeExceptionTest {
@Test
public void getResponse() throws Exception {
Map<String, Collection<String>> headers = new HashMap<String, Collection<String>>();
List<String> fooValues = new ArrayList<String>();
Map<String, Collection<String>> headers = new HashMap<>();
List<String> fooValues = new ArrayList<>();
fooValues.add("bar");
headers.put("foo", fooValues);
Request request = Request.create(GET, "https://service.com",
new HashMap<String, Collection<String>>(), new byte[] {},
Charset.defaultCharset());
Request request = Request.create(GET, "https://service.com", new HashMap<>(),
new byte[] {}, Charset.defaultCharset());
byte[] body = "foo".getBytes();
ByteArrayInputStream is = new ByteArrayInputStream(body);
Response response = Response.builder().status(200).reason("Success")

View File

@@ -15,7 +15,7 @@
<name>spring-cloud-openfeign-dependencies</name>
<description>Spring Cloud OpenFeign Dependencies</description>
<properties>
<feign.version>10.4.0</feign.version>
<feign.version>10.7.0</feign.version>
<feign-form.version>3.8.0</feign-form.version>
</properties>
<dependencyManagement>
@@ -55,11 +55,6 @@
<artifactId>feign-hystrix</artifactId>
<version>${feign.version}</version>
</dependency>
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-java8</artifactId>
<version>${feign.version}</version>
</dependency>
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-okhttp</artifactId>

View File

@@ -48,10 +48,6 @@
<groupId>io.github.openfeign</groupId>
<artifactId>feign-hystrix</artifactId>
</dependency>
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-java8</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-ribbon</artifactId>