|
|
|
@ -136,7 +136,7 @@ public class ApacheHttpClientTest {
@@ -136,7 +136,7 @@ public class ApacheHttpClientTest {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
public void noResponseBody() { |
|
|
|
|
public void noResponseBodyForPost() { |
|
|
|
|
server.enqueue(new MockResponse()); |
|
|
|
|
|
|
|
|
|
TestInterface api = Feign.builder() |
|
|
|
@ -145,6 +145,17 @@ public class ApacheHttpClientTest {
@@ -145,6 +145,17 @@ public class ApacheHttpClientTest {
|
|
|
|
|
|
|
|
|
|
api.noPostBody(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
public void noResponseBodyForPut() { |
|
|
|
|
server.enqueue(new MockResponse()); |
|
|
|
|
|
|
|
|
|
TestInterface api = Feign.builder() |
|
|
|
|
.client(new ApacheHttpClient()) |
|
|
|
|
.target(TestInterface.class, "http://localhost:" + server.getPort()); |
|
|
|
|
|
|
|
|
|
api.noPutBody(); |
|
|
|
|
} |
|
|
|
|
@Test |
|
|
|
|
public void postWithSpacesInPath() throws IOException, InterruptedException { |
|
|
|
|
server.enqueue(new MockResponse().setBody("foo")); |
|
|
|
@ -176,6 +187,9 @@ public class ApacheHttpClientTest {
@@ -176,6 +187,9 @@ public class ApacheHttpClientTest {
|
|
|
|
|
|
|
|
|
|
@RequestLine("POST") |
|
|
|
|
String noPostBody(); |
|
|
|
|
|
|
|
|
|
@RequestLine("PUT") |
|
|
|
|
String noPutBody(); |
|
|
|
|
|
|
|
|
|
@RequestLine("POST /path/{to}/resource") |
|
|
|
|
@Headers("Accept: text/plain") |
|
|
|
|