public class HttpHelper extends Object implements Closeable
| Modifier and Type | Class and Description |
|---|---|
class |
HttpHelper.MultiPartRequest |
class |
HttpHelper.RuntimeIOException |
| Constructor and Description |
|---|
HttpHelper() |
HttpHelper(AnypointClient client,
String username,
String password) |
HttpHelper(org.apache.http.impl.client.CloseableHttpClient httpClient,
AnypointClient client,
String username,
String password) |
public HttpHelper()
public HttpHelper(AnypointClient client, String username, String password)
public HttpHelper(org.apache.http.impl.client.CloseableHttpClient httpClient,
AnypointClient client,
String username,
String password)
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic void httpGetBasicAuth(String path, OutputStream outputStream) throws HttpException
HttpExceptionpublic String httpGet(String path, Environment env) throws HttpException
HttpExceptionpublic String httpGet(String path) throws HttpException
HttpExceptionpublic String httpGet(String path, Map<String,String> headers) throws HttpException
HttpExceptionpublic String httpGetWithOrgAndOwner(String path, String orgId, String ownerId) throws HttpException
HttpExceptionpublic String httpPost(String path, Object data, Environment env) throws HttpException
HttpExceptionpublic String httpPostWithOrgAndOwner(String path, Object data, String orgId, String ownerId) throws HttpException
HttpExceptionpublic String httpPost(String path, Object data, Map<String,String> headers) throws HttpException
HttpExceptionpublic String httpPost(String path, Object data) throws HttpException
HttpExceptionpublic String httpPatch(String path, Object data) throws HttpException
HttpExceptionpublic String httpPut(String path, Object data) throws HttpException
HttpExceptionpublic String httpPut(String path, Object data, Environment environment) throws HttpException
HttpExceptionpublic String httpDelete(String path) throws HttpException
HttpExceptionpublic String httpDelete(String path, Object data) throws HttpException
HttpExceptionpublic String httpDelete(@NotNull @NotNull String path, @NotNull @NotNull Environment env) throws HttpException
HttpExceptionpublic HttpHelper.MultiPartRequest createMultiPartPostRequest(String url, Environment environment)
public HttpHelper.MultiPartRequest createMultiPartPatchRequest(String url, Environment environment)
public HttpHelper.MultiPartRequest createMultiPartPutRequest(String url, Environment environment)
protected String executeWrapper(@NotNull @NotNull org.apache.http.client.methods.HttpRequestBase method, HttpHelper.MultiPartRequest multiPartRequest) throws HttpException
HttpExceptionpublic void setProxy(@NotNull
@NotNull String scheme,
@NotNull
@NotNull String host,
int port,
@Nullable
@Nullable String username,
@Nullable
@Nullable String password)
public void unsetProxy()
public int getMaxRetries()
public void setMaxRetries(int maxRetries)
public long getRetryDelay()
public void setRetryDelay(long retryDelay)
public void setClient(AnypointClient client)
public org.apache.http.impl.client.CloseableHttpClient getHttpClient()
Copyright © 2019 Kloudtek. All rights reserved.