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

com.despegar.http.client.HttpResponse Maven / Gradle / Ivy

There is a newer version: 1.0.4
Show newest version
package com.despegar.http.client;

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

public class HttpResponse {

    private int code;

    private String message;

    private Map> headers;

    private byte[] body;

    HttpResponse(int code, String message, Map> headers, byte[] body) {
        super();
        this.code = code;
        this.message = message;
        this.headers = headers;
        this.body = body;
    }

    public int code() {
        return this.code;
    }

    public String message() {
        return this.message;
    }

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

    public byte[] body() {
        return this.body;
    }

    @Override
    public String toString() {
        return "HttpResponse [code=" + this.code + ", message=" + this.message + ", headers=" + this.headers + ", body="
            + Arrays.toString(this.body) + "]";
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy