data-dump/src/main/java/com/celnet/datadump/util/HttpTransportInterface.java
2025-09-09 11:10:53 +08:00

38 lines
1.1 KiB
Java

package com.celnet.datadump.util;
import com.sforce.async.AsyncApiException;
import com.sforce.ws.transport.Transport;
import org.apache.http.HttpResponse;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.HashMap;
/**
* This interface defines a Transport.
*
* @author http://cheenath.com
* @version 1.0
* @since 1.0 Nov 30, 2005
*/
public interface HttpTransportInterface extends Transport {
enum SupportedHttpMethodType {
PUT,
POST,
PATCH,
DELETE,
GET
}
int PROXY_AUTHENTICATION_REQUIRED = 407;
OutputStream connect(String endpoint, HashMap<String, String> httpHeaders, boolean enableCompression,
SupportedHttpMethodType httpMethod) throws IOException;
void connect(String endpoint, HashMap<String, String> httpHeaders, boolean enableCompression,
SupportedHttpMethodType httpMethod, InputStream contentInputStream, String contentEncoding) throws IOException;
InputStream httpGet(String urlStr) throws IOException, AsyncApiException;
HttpResponse getHttpResponse();
}