cl.transbank.util.HttpUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of transbank-sdk-java Show documentation
Show all versions of transbank-sdk-java Show documentation
Tranbank API integration SDK for Java Projects
package cl.transbank.util;
import cl.transbank.webpay.exception.TransbankHttpApiException;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NonNull;
import java.io.IOException;
import java.net.URL;
import java.util.Map;
public interface HttpUtil {
T request(@NonNull URL url, RequestMethod method, Object request, Map headers,
Class clazz) throws IOException, TransbankHttpApiException;
String request(URL url, HttpUtilImpl.RequestMethod method, String query) throws IOException, TransbankHttpApiException;
String request(URL url, HttpUtilImpl.RequestMethod method, String query, HttpUtil.ContentType contentType)
throws IOException, TransbankHttpApiException;
String request(@NonNull URL url, RequestMethod method, String query, Map headers)
throws IOException, TransbankHttpApiException;
String request(@NonNull URL url, RequestMethod method, String query, ContentType contentType, Map headers) throws IOException, TransbankHttpApiException;
@AllArgsConstructor
enum ContentType {
JSON("application/json");
@Getter
private String contentType;
}
enum RequestMethod {
GET,
POST,
DELETE,
PUT
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy