aboutsummaryrefslogtreecommitdiffstats
path: root/vespa-feed-client-api
diff options
context:
space:
mode:
authorjonmv <venstad@gmail.com>2022-12-07 13:47:00 +0100
committerjonmv <venstad@gmail.com>2022-12-07 13:47:00 +0100
commit0e810a41b6c335b418b1e8dbdfee98b883d32cef (patch)
tree27a7fdc876712e9be41679fae83a54c5b39f3786 /vespa-feed-client-api
parentc505db644cbdc735d487de51ab23b92f7f90b3d2 (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.java2
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; }