de.adorsys.multibanking.ing.http.Request Maven / Gradle / Ivy
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 {
}
}
}