public final class StreamDecoder extends Object implements Decoder
Example:
Feign.builder()
.decoder(StreamDecoder.create(JacksonIteratorDecoder.create()))
.doNotCloseAfterDecode() // Required for streaming
.target(GitHub.class, "https://api.github.com");
interface GitHub {
@RequestLine("GET /repos/{owner}/{repo}/contributors")
Stream contributors(@Param("owner") String owner, @Param("repo") String repo);
} Decoder.Default| Modifier and Type | Method and Description |
|---|---|
static StreamDecoder |
create(Decoder iteratorDecoder) |
Object |
decode(Response response,
Type type) |
public Object decode(Response response, Type type) throws IOException, FeignException
decode in interface DecoderIOExceptionFeignExceptionpublic static StreamDecoder create(Decoder iteratorDecoder)
Copyright © 2012–2018 OpenFeign. All rights reserved.