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

io.github.shoothzj.http.client.facade.HttpResponse Maven / Gradle / Ivy

Go to download

Http client abstracts multiple underlying HTTP clients, such as Jdk and OkHttp, and provides a unified API

The newest version!
package io.github.shoothzj.http.client.facade;

import org.jetbrains.annotations.Nullable;

import java.util.List;
import java.util.Map;

public class HttpResponse {

    private final int statusCode;

    @Nullable
    private final byte[] body;

    private final Map> headers;

    public HttpResponse(int statusCode, @Nullable byte[] body, Map> headers) {
        this.statusCode = statusCode;
        this.body = body;
        this.headers = headers;
    }

    public int statusCode() {
        return statusCode;
    }

    @Nullable
    public byte[] body() {
        return body;
    }

    public Map> headers() {
        return headers;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy