MCPcopy Index your code
hub / github.com/OpenFeign/feign / defaults

Method defaults

core/src/test/java/feign/FeignBuilderTest.java:52–63  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50 public final MockWebServer server = new MockWebServer();
51
52 @Test
53 void defaults() throws Exception {
54 server.enqueue(new MockResponse().setBody("response data"));
55
56 String url = "http://localhost:" + server.getPort();
57 TestInterface api = Feign.builder().target(TestInterface.class, url);
58
59 Response response = api.codecPost("request data");
60 assertThat(Util.toString(response.body().asReader(Util.UTF_8))).isEqualTo("response data");
61
62 assertThat(server.takeRequest()).hasBody("request data");
63 }
64
65 /** Shows exception handling isn't required to coerce 404 to null or empty */
66 @Test

Callers

nothing calls this directly

Calls 9

builderMethod · 0.95
codecPostMethod · 0.95
toStringMethod · 0.95
bodyMethod · 0.95
takeRequestMethod · 0.80
asReaderMethod · 0.65
targetMethod · 0.45
assertThatMethod · 0.45
hasBodyMethod · 0.45

Tested by

no test coverage detected