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

de.adorsys.multibanking.ing.http.Request Maven / Gradle / Ivy

There is a newer version: 5.5.34
Show newest version
package de.adorsys.multibanking.ing.http;

import de.adorsys.multibanking.ing.http.HttpClient;
import de.adorsys.multibanking.ing.model.Response;

import java.util.Map;
import java.util.function.UnaryOperator;

public interface Request {

    interface Builder {

        String method();

        String uri();

        Builder jsonBody(String body);

        String jsonBody();

        Builder emptyBody(boolean empty);

        boolean emptyBody();

        Builder urlEncodedBody(Map formData);

        Map urlEncodedBody();

        Builder headers(Map headers);

        Map headers();

        Builder header(String name, String value);

         Response send(Interceptor interceptor, HttpClient.ResponseHandler responseHandler);

        default  Response send(HttpClient.ResponseHandler responseHandler) {
            return send(x -> x, responseHandler);
        }

        String content();

        @FunctionalInterface
        interface Interceptor extends UnaryOperator {
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy