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

io.sphere.sdk.http.HttpRequest Maven / Gradle / Ivy

There is a newer version: 1.0.0-M26
Show newest version
package io.sphere.sdk.http;

import javax.annotation.Nullable;

public interface HttpRequest {
    HttpMethod getHttpMethod();

    String getUrl();

    HttpHeaders getHeaders();

    @Nullable
    HttpRequestBody getBody();

    static HttpRequest of(final HttpMethod httpMethod, final String url) {
        return of(httpMethod, url, HttpHeaders.empty(), null);
    }

    static HttpRequest of(final HttpMethod httpMethod, final String url, final HttpHeaders headers, @Nullable final HttpRequestBody body) {
        return new HttpRequestImpl(httpMethod, url, headers, body);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy