Class HttpOp
- java.lang.Object
-
- org.apache.jena.riot.web.HttpOp
-
public class HttpOp extends java.lang.ObjectSimplified HTTP operations; simplification means only supporting certain uses of HTTP. The expectation is that the simplified operations in this class can be used by other code to generate more application specific HTTP interactions (e.g. SPARQL queries). For more complicated requirements of HTTP, then the application will need to use org.apache.http.client directly.For HTTP GET, the application supplies a URL, the accept header string, and a list of handlers to deal with different content type responses.
For HTTP POST, the application supplies a URL, content, the accept header string, and a list of handlers to deal with different content type responses, or no response is expected.
For HTTP PUT, the application supplies a URL, content, the accept header string
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHttpOp.CaptureInputTypedInputStream from an HTTP response.static classHttpOp.CaptureStringCapture response as a string (UTF-8 assumed)
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringARQ_USER_AGENTConstant for the default User-Agent header that ARQ will usestatic org.apache.http.client.HttpClientinitialDefaultHttpClientUsed to resetdefaultHttpClientwhen needed
-
Constructor Summary
Constructors Constructor Description HttpOp()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidapplyUserAgent(org.apache.http.HttpMessage message)Applies the configured User-Agent string to the HTTP requeststatic org.apache.http.impl.client.CloseableHttpClientcreateCachingHttpClient()Create an HttpClient that performs client-side caching and connection pooling.static org.apache.http.client.HttpClientcreateDefaultHttpClient()static org.apache.http.impl.client.CloseableHttpClientcreatePoolingHttpClient()Create an HttpClient that performs connection pooling.static org.apache.http.impl.client.HttpClientBuildercreatePoolingHttpClientBuilder()Create an HttpClientBuilder that performs connection pooling.static voidexecHttpDelete(java.lang.String url)Executes a HTTP DELETE operationstatic voidexecHttpDelete(java.lang.String url, HttpResponseHandler handler)Executes a HTTP DELETE operationstatic voidexecHttpDelete(java.lang.String url, HttpResponseHandler handler, org.apache.http.client.HttpClient httpClient, org.apache.http.protocol.HttpContext httpContext)Executes a HTTP DELETE operationstatic TypedInputStreamexecHttpGet(java.lang.String url)Executes a HTTP GET and return a TypedInputStream.static TypedInputStreamexecHttpGet(java.lang.String url, java.lang.String acceptHeader)Executes a HTTP GET and return a TypedInputStream.static TypedInputStreamexecHttpGet(java.lang.String url, java.lang.String acceptHeader, org.apache.http.client.HttpClient httpClient, org.apache.http.protocol.HttpContext httpContext)Executes a HTTP GET and returns a TypedInputStreamstatic voidexecHttpGet(java.lang.String url, java.lang.String acceptHeader, HttpResponseHandler handler)Executes a HTTP Get request, handling the response with given handler.static voidexecHttpGet(java.lang.String url, java.lang.String acceptHeader, HttpResponseHandler handler, org.apache.http.client.HttpClient httpClient, org.apache.http.protocol.HttpContext httpContext)Executes a HTTP Get request handling the response with one of the given handlersstatic java.lang.StringexecHttpGetString(java.lang.String url)Convenience operation to execute a GET with no content negotiation and return the response as a string.static java.lang.StringexecHttpGetString(java.lang.String url, java.lang.String acceptHeader)Convenience operation to execute a GET and return the response as a stringstatic voidexecHttpHead(java.lang.String url)Executes a HTTP HEAD operationstatic voidexecHttpHead(java.lang.String url, java.lang.String acceptString, HttpResponseHandler handler)Executes a HTTP HEAD operationstatic voidexecHttpHead(java.lang.String url, java.lang.String acceptString, HttpResponseHandler handler, org.apache.http.client.HttpClient httpClient, org.apache.http.protocol.HttpContext httpContext)Executes a HTTP HEAD operationstatic voidexecHttpPost(java.lang.String url, java.lang.String contentType, java.io.InputStream input, long length)Executes a HTTP POST with a request body from an input stream without response body with no response handlingstatic voidexecHttpPost(java.lang.String url, java.lang.String contentType, java.io.InputStream input, long length, java.lang.String acceptType, HttpResponseHandler handler)Executes a HTTP POST with request body from an input stream and response handling.static voidexecHttpPost(java.lang.String url, java.lang.String contentType, java.io.InputStream input, long length, java.lang.String acceptType, HttpResponseHandler handler, org.apache.http.client.HttpClient httpClient, org.apache.http.protocol.HttpContext httpContext)Executes a HTTP POST with request body from an input stream and response handling.static voidexecHttpPost(java.lang.String url, java.lang.String contentType, java.lang.String content)Executes a HTTP POST with the given contentype/string as the request body and throws away success responses, failure responses will throw an error.static voidexecHttpPost(java.lang.String url, java.lang.String contentType, java.lang.String content, java.lang.String acceptType, HttpResponseHandler handler, org.apache.http.client.HttpClient httpClient, org.apache.http.protocol.HttpContext httpContext)Executes a HTTP POST with a string as the request body and response handlingstatic voidexecHttpPost(java.lang.String url, java.lang.String contentType, java.lang.String content, org.apache.http.client.HttpClient httpClient, org.apache.http.protocol.HttpContext httpContext)Executes a HTTP POST with a string as the request body and response handlingstatic voidexecHttpPost(java.lang.String url, org.apache.http.HttpEntity entity)Executes a HTTP POST of the given entitystatic voidexecHttpPost(java.lang.String url, org.apache.http.HttpEntity entity, java.lang.String acceptString, HttpResponseHandler handler)Executes a HTTP Poststatic voidexecHttpPost(java.lang.String url, org.apache.http.HttpEntity entity, java.lang.String acceptHeader, HttpResponseHandler handler, org.apache.http.client.HttpClient httpClient, org.apache.http.protocol.HttpContext httpContext)POST with response body.static voidexecHttpPost(java.lang.String url, org.apache.http.HttpEntity entity, org.apache.http.client.HttpClient httpClient, org.apache.http.protocol.HttpContext httpContext)POST with response body.static voidexecHttpPostForm(java.lang.String url, Params params)Executes a HTTP POST.static voidexecHttpPostForm(java.lang.String url, Params params, java.lang.String acceptString, HttpResponseHandler handler)Executes a HTTP POST form operationstatic voidexecHttpPostForm(java.lang.String url, Params params, java.lang.String acceptHeader, HttpResponseHandler handler, org.apache.http.client.HttpClient httpClient, org.apache.http.protocol.HttpContext httpContext)Executes a HTTP POST form operationstatic TypedInputStreamexecHttpPostFormStream(java.lang.String url, Params params, java.lang.String acceptHeader)Executes a HTTP POST and returns a TypedInputStream, The TypedInputStream must be closed.static TypedInputStreamexecHttpPostFormStream(java.lang.String url, Params params, java.lang.String acceptHeader, org.apache.http.client.HttpClient httpClient, org.apache.http.protocol.HttpContext httpContext)Executes a HTTP POST Form and returns a TypedInputStreamstatic TypedInputStreamexecHttpPostStream(java.lang.String url, java.lang.String contentType, java.lang.String content, java.lang.String acceptType)Execute a HTTP POST and return the typed return stream.static TypedInputStreamexecHttpPostStream(java.lang.String url, java.lang.String contentType, java.lang.String content, java.lang.String acceptType, org.apache.http.client.HttpClient httpClient, org.apache.http.protocol.HttpContext httpContext)static TypedInputStreamexecHttpPostStream(java.lang.String url, org.apache.http.HttpEntity entity, java.lang.String acceptHeader)Execute a HTTP POST and return the typed return stream.static TypedInputStreamexecHttpPostStream(java.lang.String url, org.apache.http.HttpEntity entity, java.lang.String acceptHeader, org.apache.http.client.HttpClient httpClient, org.apache.http.protocol.HttpContext httpContext)POST with response body.static voidexecHttpPut(java.lang.String url, java.lang.String contentType, java.io.InputStream input, long length)Executes a HTTP PUT operationstatic voidexecHttpPut(java.lang.String url, java.lang.String contentType, java.io.InputStream input, long length, org.apache.http.client.HttpClient httpClient, org.apache.http.protocol.HttpContext httpContext)Executes a HTTP PUT operationstatic voidexecHttpPut(java.lang.String url, java.lang.String contentType, java.lang.String content)Executes a HTTP PUT operationstatic voidexecHttpPut(java.lang.String url, java.lang.String contentType, java.lang.String content, org.apache.http.client.HttpClient httpClient, org.apache.http.protocol.HttpContext httpContext)Executes a HTTP PUT operationstatic voidexecHttpPut(java.lang.String url, org.apache.http.HttpEntity entity)Executes a HTTP PUT operationstatic voidexecHttpPut(java.lang.String url, org.apache.http.HttpEntity entity, org.apache.http.client.HttpClient httpClient, org.apache.http.protocol.HttpContext httpContext)Executes a HTTP PUT operationstatic org.apache.http.client.HttpClientgetDefaultHttpClient()Return the current defaultHttpClient.static java.lang.StringgetUserAgent()Gets the User-Agent string that ARQ is applying to all HTTP requestsstatic java.lang.StringreadPayload(org.apache.http.HttpEntity entity)static voidsetDefaultHttpClient(org.apache.http.client.HttpClient client)Performance can be improved by using a shared HttpClient that uses connection pooling.static HttpRequestTransformersetRequestTransformer(HttpRequestTransformer tform)Setting anHttpRequestTransformerallows manipulation or enhancement of HTTP requests.static voidsetUserAgent(java.lang.String userAgent)Sets the User-Agent string that ARQ will apply to all HTTP requests
-
-
-
Field Detail
-
initialDefaultHttpClient
public static final org.apache.http.client.HttpClient initialDefaultHttpClient
Used to resetdefaultHttpClientwhen needed
-
ARQ_USER_AGENT
public static final java.lang.String ARQ_USER_AGENT
Constant for the default User-Agent header that ARQ will use
-
-
Method Detail
-
createDefaultHttpClient
public static org.apache.http.client.HttpClient createDefaultHttpClient()
-
getDefaultHttpClient
public static org.apache.http.client.HttpClient getDefaultHttpClient()
Return the current defaultHttpClient. This may be null, meaning a newHttpClientis created each time, if none is provided in the HttpOp function call.- Returns:
- Default HTTP Client
-
setDefaultHttpClient
public static void setDefaultHttpClient(org.apache.http.client.HttpClient client)
Performance can be improved by using a shared HttpClient that uses connection pooling. However, pool management is complicated and can lead to starvation (the system locks-up, especially on Java6; it's JVM sensitive). See the Apache HTTP Commons Client documentation for more details.- Parameters:
client- HTTP client to use, if this is null, reset to original default instead
-
setRequestTransformer
public static HttpRequestTransformer setRequestTransformer(HttpRequestTransformer tform)
Setting anHttpRequestTransformerallows manipulation or enhancement of HTTP requests.- Parameters:
tform- HttpRequestTransformer to use,nullfor none (the default)- Returns:
- the previous HttpRequestTransformer in use
-
createPoolingHttpClient
public static org.apache.http.impl.client.CloseableHttpClient createPoolingHttpClient()
Create an HttpClient that performs connection pooling. This can be used withsetDefaultHttpClient(org.apache.http.client.HttpClient)or provided in the HttpOp calls.
-
createPoolingHttpClientBuilder
public static org.apache.http.impl.client.HttpClientBuilder createPoolingHttpClientBuilder()
Create an HttpClientBuilder that performs connection pooling.
-
createCachingHttpClient
public static org.apache.http.impl.client.CloseableHttpClient createCachingHttpClient()
Create an HttpClient that performs client-side caching and connection pooling. This can be used withsetDefaultHttpClient(org.apache.http.client.HttpClient)or provided in the HttpOp calls. Beware that content is cached in this process, including across remote server restart.
-
getUserAgent
public static java.lang.String getUserAgent()
Gets the User-Agent string that ARQ is applying to all HTTP requests- Returns:
- User-Agent string
-
setUserAgent
public static void setUserAgent(java.lang.String userAgent)
Sets the User-Agent string that ARQ will apply to all HTTP requests- Parameters:
userAgent- User-Agent string
-
execHttpGet
public static void execHttpGet(java.lang.String url, java.lang.String acceptHeader, HttpResponseHandler handler)Executes a HTTP Get request, handling the response with given handler.HTTP responses 400 and 500 become exceptions.
- Parameters:
url- URLacceptHeader- Accept Headerhandler- Response Handler
-
execHttpGet
public static void execHttpGet(java.lang.String url, java.lang.String acceptHeader, HttpResponseHandler handler, org.apache.http.client.HttpClient httpClient, org.apache.http.protocol.HttpContext httpContext)Executes a HTTP Get request handling the response with one of the given handlersThe acceptHeader string is any legal value for HTTP Accept: field.
The handlers are the set of content types (without charset), used to dispatch the response body for handling.
HTTP responses 400 and 500 become exceptions.
- Parameters:
url- URLacceptHeader- Accept Headerhandler- Response handler called to process the responsehttpClient- HTTP ClienthttpContext- HTTP Context
-
execHttpGet
public static TypedInputStream execHttpGet(java.lang.String url)
Executes a HTTP GET and return a TypedInputStream. The stream must be closed after use.The acceptHeader string is any legal value for HTTP Accept: field.
- Parameters:
url- URL- Returns:
- TypedInputStream
-
execHttpGet
public static TypedInputStream execHttpGet(java.lang.String url, java.lang.String acceptHeader)
Executes a HTTP GET and return a TypedInputStream. The stream must be closed after use.The acceptHeader string is any legal value for HTTP Accept: field.
- Parameters:
url- URLacceptHeader- Accept Header- Returns:
- TypedInputStream or null if the URL returns 404.
-
execHttpGet
public static TypedInputStream execHttpGet(java.lang.String url, java.lang.String acceptHeader, org.apache.http.client.HttpClient httpClient, org.apache.http.protocol.HttpContext httpContext)
Executes a HTTP GET and returns a TypedInputStreamA 404 will result in a null stream being returned, any other error code results in an exception.
- Parameters:
url- URLacceptHeader- Accept HeaderhttpClient- HTTP ClienthttpContext- HTTP Context- Returns:
- TypedInputStream or null if the URL returns 404.
-
execHttpGetString
public static java.lang.String execHttpGetString(java.lang.String url)
Convenience operation to execute a GET with no content negotiation and return the response as a string.- Parameters:
url- URL- Returns:
- Response as a string
-
execHttpGetString
public static java.lang.String execHttpGetString(java.lang.String url, java.lang.String acceptHeader)Convenience operation to execute a GET and return the response as a string- Parameters:
url- URLacceptHeader- Accept header.- Returns:
- Response as a string
-
execHttpPost
public static void execHttpPost(java.lang.String url, java.lang.String contentType, java.lang.String content)Executes a HTTP POST with the given contentype/string as the request body and throws away success responses, failure responses will throw an error.- Parameters:
url- URLcontentType- Content Type to POSTcontent- Content to POST
-
execHttpPostStream
public static TypedInputStream execHttpPostStream(java.lang.String url, java.lang.String contentType, java.lang.String content, java.lang.String acceptType)
Execute a HTTP POST and return the typed return stream.- Parameters:
url- URLcontentType- Content Type to POSTcontent- Content to POSTacceptType- Accept Type
-
execHttpPost
public static void execHttpPost(java.lang.String url, java.lang.String contentType, java.lang.String content, org.apache.http.client.HttpClient httpClient, org.apache.http.protocol.HttpContext httpContext)Executes a HTTP POST with a string as the request body and response handling- Parameters:
url- URLcontentType- Content Type to POSTcontent- Content to POSThttpClient- HTTP ClienthttpContext- HTTP Context
-
execHttpPostStream
public static TypedInputStream execHttpPostStream(java.lang.String url, java.lang.String contentType, java.lang.String content, java.lang.String acceptType, org.apache.http.client.HttpClient httpClient, org.apache.http.protocol.HttpContext httpContext)
-
execHttpPost
public static void execHttpPost(java.lang.String url, java.lang.String contentType, java.lang.String content, java.lang.String acceptType, HttpResponseHandler handler, org.apache.http.client.HttpClient httpClient, org.apache.http.protocol.HttpContext httpContext)Executes a HTTP POST with a string as the request body and response handling- Parameters:
url- URLcontentType- Content Type to POSTcontent- Content to POSTacceptType- Accept Typehandler- Response handler called to process the responsehttpClient- HTTP ClienthttpContext- HTTP Context
-
execHttpPost
public static void execHttpPost(java.lang.String url, java.lang.String contentType, java.io.InputStream input, long length)Executes a HTTP POST with a request body from an input stream without response body with no response handling- Parameters:
url- URLcontentType- Content Type to POSTinput- Input Stream to POST fromlength- Amount of content to POST
-
execHttpPost
public static void execHttpPost(java.lang.String url, java.lang.String contentType, java.io.InputStream input, long length, java.lang.String acceptType, HttpResponseHandler handler)Executes a HTTP POST with request body from an input stream and response handling.The input stream is assumed to be UTF-8.
- Parameters:
url- URLcontentType- Content Type to POSTinput- Input Stream to POST content fromlength- Length of content to POSTacceptType- Accept Typehandler- Response handler called to process the response
-
execHttpPost
public static void execHttpPost(java.lang.String url, java.lang.String contentType, java.io.InputStream input, long length, java.lang.String acceptType, HttpResponseHandler handler, org.apache.http.client.HttpClient httpClient, org.apache.http.protocol.HttpContext httpContext)Executes a HTTP POST with request body from an input stream and response handling.The input stream is assumed to be UTF-8.
- Parameters:
url- URLcontentType- Content Type to POSTinput- Input Stream to POST content fromlength- Length of content to POSTacceptType- Accept Typehandler- Response handler called to process the responsehttpClient- HTTP ClienthttpContext- HTTP Context
-
execHttpPost
public static void execHttpPost(java.lang.String url, org.apache.http.HttpEntity entity)Executes a HTTP POST of the given entity- Parameters:
url- URLentity- Entity to POST
-
execHttpPostStream
public static TypedInputStream execHttpPostStream(java.lang.String url, org.apache.http.HttpEntity entity, java.lang.String acceptHeader)
Execute a HTTP POST and return the typed return stream.- Parameters:
url- URLentity- Entity to POST
-
execHttpPost
public static void execHttpPost(java.lang.String url, org.apache.http.HttpEntity entity, java.lang.String acceptString, HttpResponseHandler handler)Executes a HTTP Post- Parameters:
url- URLentity- Entity to POSTacceptString- Accept Headerhandler- Response Handler
-
execHttpPost
public static void execHttpPost(java.lang.String url, org.apache.http.HttpEntity entity, org.apache.http.client.HttpClient httpClient, org.apache.http.protocol.HttpContext httpContext)POST with response body.The content for the POST body comes from the HttpEntity.
Additional headers e.g. for authentication can be injected through an
HttpContext- Parameters:
url- URLentity- Entity to POSThttpClient- HTTP ClienthttpContext- HTTP Context
-
execHttpPostStream
public static TypedInputStream execHttpPostStream(java.lang.String url, org.apache.http.HttpEntity entity, java.lang.String acceptHeader, org.apache.http.client.HttpClient httpClient, org.apache.http.protocol.HttpContext httpContext)
POST with response body.The content for the POST body comes from the HttpEntity.
Additional headers e.g. for authentication can be injected through an
HttpContext- Parameters:
url- URLentity- Entity to POSTacceptHeader- Accept HeaderhttpClient- HTTP ClienthttpContext- HTTP Context
-
execHttpPost
public static void execHttpPost(java.lang.String url, org.apache.http.HttpEntity entity, java.lang.String acceptHeader, HttpResponseHandler handler, org.apache.http.client.HttpClient httpClient, org.apache.http.protocol.HttpContext httpContext)POST with response body.The content for the POST body comes from the HttpEntity.
Additional headers e.g. for authentication can be injected through an
HttpContext- Parameters:
url- URLentity- Entity to POSTacceptHeader- Accept Headerhandler- Response handler called to process the responsehttpClient- HTTP ClienthttpContext- HTTP Context
-
execHttpPostForm
public static void execHttpPostForm(java.lang.String url, Params params)Executes a HTTP POST.- Parameters:
url- URLparams- Parameters to POST
-
execHttpPostFormStream
public static TypedInputStream execHttpPostFormStream(java.lang.String url, Params params, java.lang.String acceptHeader)
Executes a HTTP POST and returns a TypedInputStream, The TypedInputStream must be closed.- Parameters:
url- URLparams- Parameters to POSTacceptHeader-
-
execHttpPostFormStream
public static TypedInputStream execHttpPostFormStream(java.lang.String url, Params params, java.lang.String acceptHeader, org.apache.http.client.HttpClient httpClient, org.apache.http.protocol.HttpContext httpContext)
Executes a HTTP POST Form and returns a TypedInputStreamThe acceptHeader string is any legal value for HTTP Accept: field.
A 404 will result in a null stream being returned, any other error code results in an exception.
- Parameters:
url- URLacceptHeader- Accept Headerparams- Parameters to POSThttpClient- HTTP ClienthttpContext- HTTP Context
-
execHttpPostForm
public static void execHttpPostForm(java.lang.String url, Params params, java.lang.String acceptString, HttpResponseHandler handler)Executes a HTTP POST form operation- Parameters:
url- URLparams- Form parameters to POSTacceptString- Accept Headerhandler- Response handler called to process the response
-
execHttpPostForm
public static void execHttpPostForm(java.lang.String url, Params params, java.lang.String acceptHeader, HttpResponseHandler handler, org.apache.http.client.HttpClient httpClient, org.apache.http.protocol.HttpContext httpContext)Executes a HTTP POST form operation- Parameters:
url- URLparams- Form parameters to POSTacceptHeader- Accept Headerhandler- Response handler called to process the responsehttpClient- HTTP ClienthttpContext- HTTP Context
-
execHttpPut
public static void execHttpPut(java.lang.String url, java.lang.String contentType, java.lang.String content)Executes a HTTP PUT operation- Parameters:
url- URLcontentType- Content Type for the PUTcontent- Content for the PUT
-
execHttpPut
public static void execHttpPut(java.lang.String url, java.lang.String contentType, java.lang.String content, org.apache.http.client.HttpClient httpClient, org.apache.http.protocol.HttpContext httpContext)Executes a HTTP PUT operation- Parameters:
url- URLcontentType- Content Type for the PUTcontent- Content for the PUThttpClient- HTTP ClienthttpContext- HTTP Context
-
execHttpPut
public static void execHttpPut(java.lang.String url, java.lang.String contentType, java.io.InputStream input, long length)Executes a HTTP PUT operation- Parameters:
url- URLcontentType- Content Type for the PUTinput- Input Stream to read PUT content fromlength- Amount of content to PUT
-
execHttpPut
public static void execHttpPut(java.lang.String url, java.lang.String contentType, java.io.InputStream input, long length, org.apache.http.client.HttpClient httpClient, org.apache.http.protocol.HttpContext httpContext)Executes a HTTP PUT operation- Parameters:
url- URLcontentType- Content Type for the PUTinput- Input Stream to read PUT content fromlength- Amount of content to PUThttpClient- HTTP ClienthttpContext- HTTP Context
-
execHttpPut
public static void execHttpPut(java.lang.String url, org.apache.http.HttpEntity entity)Executes a HTTP PUT operation- Parameters:
url- URLentity- HTTP Entity to PUT
-
execHttpPut
public static void execHttpPut(java.lang.String url, org.apache.http.HttpEntity entity, org.apache.http.client.HttpClient httpClient, org.apache.http.protocol.HttpContext httpContext)Executes a HTTP PUT operation- Parameters:
url- URLentity- HTTP Entity to PUThttpClient- HTTP ClienthttpContext- HTTP Context
-
execHttpHead
public static void execHttpHead(java.lang.String url)
Executes a HTTP HEAD operation- Parameters:
url- URL
-
execHttpHead
public static void execHttpHead(java.lang.String url, java.lang.String acceptString, HttpResponseHandler handler)Executes a HTTP HEAD operation- Parameters:
url- URLacceptString- Accept Headerhandler- Response Handler
-
execHttpHead
public static void execHttpHead(java.lang.String url, java.lang.String acceptString, HttpResponseHandler handler, org.apache.http.client.HttpClient httpClient, org.apache.http.protocol.HttpContext httpContext)Executes a HTTP HEAD operation- Parameters:
url- URLacceptString- Accept Headerhandler- Response HandlerhttpClient- HTTP ClienthttpContext- HTTP Context
-
execHttpDelete
public static void execHttpDelete(java.lang.String url)
Executes a HTTP DELETE operation- Parameters:
url- URL
-
execHttpDelete
public static void execHttpDelete(java.lang.String url, HttpResponseHandler handler)Executes a HTTP DELETE operation- Parameters:
url- URLhandler- Response Handler
-
execHttpDelete
public static void execHttpDelete(java.lang.String url, HttpResponseHandler handler, org.apache.http.client.HttpClient httpClient, org.apache.http.protocol.HttpContext httpContext)Executes a HTTP DELETE operation- Parameters:
url- URLhandler- Response HandlerhttpClient- HTTP ClienthttpContext- HTTP Context
-
readPayload
public static java.lang.String readPayload(org.apache.http.HttpEntity entity) throws java.io.IOException- Throws:
java.io.IOException
-
applyUserAgent
public static void applyUserAgent(org.apache.http.HttpMessage message)
Applies the configured User-Agent string to the HTTP request- Parameters:
message- HTTP request
-
-