diff options
author | jonmv <venstad@gmail.com> | 2022-12-07 13:47:00 +0100 |
---|---|---|
committer | jonmv <venstad@gmail.com> | 2022-12-07 13:47:00 +0100 |
commit | 0e810a41b6c335b418b1e8dbdfee98b883d32cef (patch) | |
tree | 27a7fdc876712e9be41679fae83a54c5b39f3786 /vespa-feed-client-api | |
parent | c505db644cbdc735d487de51ab23b92f7f90b3d2 (diff) |
Parse error responses
Diffstat (limited to 'vespa-feed-client-api')
-rw-r--r-- | vespa-feed-client-api/src/main/java/ai/vespa/feed/client/HttpResponse.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/vespa-feed-client-api/src/main/java/ai/vespa/feed/client/HttpResponse.java b/vespa-feed-client-api/src/main/java/ai/vespa/feed/client/HttpResponse.java index 62850fef32d..dece21acd89 100644 --- a/vespa-feed-client-api/src/main/java/ai/vespa/feed/client/HttpResponse.java +++ b/vespa-feed-client-api/src/main/java/ai/vespa/feed/client/HttpResponse.java @@ -6,6 +6,8 @@ public interface HttpResponse { int code(); byte[] body(); + default String contentType() { return "application/json"; } + static HttpResponse of(int code, byte[] body) { return new HttpResponse() { @Override public int code() { return code; } |