Browse Source

Return null (empty target object) if status code is 204 (#792)

pull/794/head
Selim Ok 6 years ago committed by Kevin Davis
parent
commit
3c7af5710c
  1. 2
      jaxb/src/main/java/feign/jaxb/JAXBDecoder.java

2
jaxb/src/main/java/feign/jaxb/JAXBDecoder.java

@ -66,7 +66,7 @@ public class JAXBDecoder implements Decoder { @@ -66,7 +66,7 @@ public class JAXBDecoder implements Decoder {
@Override
public Object decode(Response response, Type type) throws IOException {
if (response.status() == 404)
if (response.status() == 404 || response.status() == 204)
return Util.emptyValueOf(type);
if (response.body() == null)
return null;

Loading…
Cancel
Save