Upgrade to 10.7.0. (#270)
This commit is contained in:
committed by
GitHub
parent
41e9b55869
commit
8aa4729537
@@ -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>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user