All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ai.vespa.feed.client.HttpResponse Maven / Gradle / Ivy

There is a newer version: 8.443.12
Show newest version
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package ai.vespa.feed.client;

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; }
            @Override public byte[] body() { return body; }
        };
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy