@Test public void throwsFeignExceptionIncludingBody() throws Throwable { server.enqueue(new MockResponse().setBody("success!")); TestInterfaceAsync api = AsyncFeign.asyncBuilder().decoder((response, type) -> { throw new IOException("timeout"); }).target(TestInterfaceAsync.class, "http: CompletableFuture<?> cf = api.body("Request body"); server.takeRequest(); try { unwrap(cf); } catch (FeignException e) { assertThat(e.getMessage()) .isEqualTo("timeout reading POST http: assertThat(e.contentUTF8()).isEqualTo("Request body"); return; } fail(); }
public static <C> AsyncBuilder<C> asyncBuilder() { return new AsyncBuilder<>(); }
AsyncFeign extends Feign { public static <C> AsyncBuilder<C> asyncBuilder() { return new AsyncBuilder<>(); } }
AsyncFeign extends Feign { public static <C> AsyncBuilder<C> asyncBuilder() { return new AsyncBuilder<>(); } protected  AsyncFeign(AsyncBuilder<C> asyncBuilder); }
AsyncFeign extends Feign { public static <C> AsyncBuilder<C> asyncBuilder() { return new AsyncBuilder<>(); } protected  AsyncFeign(AsyncBuilder<C> asyncBuilder); static AsyncBuilder<C> asyncBuilder(); @Override T newInstance(Target<T> target); T newInstance(Target<T> target, C context); }
AsyncFeign extends Feign { public static <C> AsyncBuilder<C> asyncBuilder() { return new AsyncBuilder<>(); } protected  AsyncFeign(AsyncBuilder<C> asyncBuilder); static AsyncBuilder<C> asyncBuilder(); @Override T newInstance(Target<T> target); T newInstance(Target<T> target, C context);  }