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

io.apimatic.coreinterfaces.http.HttpClient Maven / Gradle / Ivy

Go to download

An abstract layer of the functionalities provided by apimatic-core-library, okhttp-client-adapter and APIMatic SDKs.

There is a newer version: 0.3.1
Show newest version
package io.apimatic.coreinterfaces.http;

import java.io.IOException;
import java.util.concurrent.CompletableFuture;
import io.apimatic.coreinterfaces.http.request.Request;
import io.apimatic.coreinterfaces.http.request.configuration.CoreEndpointConfiguration;
import io.apimatic.coreinterfaces.http.response.Response;

/**
 * To send HTTP Requests and read the responses.
 */
public interface HttpClient {

    /**
     * Execute a given Request to get string/binary response back.
     * @param request The given HttpRequest to execute.
     * @param endpointConfiguration The overridden configuration for request.
     * @return CompletableFuture of Response after execution.
     */
    CompletableFuture executeAsync(Request request,
            CoreEndpointConfiguration endpointConfiguration);

    /**
     * Execute a given Request to get string/binary response back.
     * @param request The given Request to execute.
     * @param endpointConfiguration The overridden configuration for request.
     * @return The converted response.
     * @throws IOException exception to be thrown while converting response.
     */
    Response execute(Request request, CoreEndpointConfiguration endpointConfiguration)
            throws IOException;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy