org.n52.oxf.util.web
Interface HttpClient

All Known Implementing Classes:
BasicAuthenticationHttpClient, GzipEnabledHttpClient, HttpClientDecorator, PoolingConnectionManagerHttpClient, PreemptiveBasicAuthenticationHttpClient, ProxyAwareHttpClient, SimpleHttpClient

public interface HttpClient


Method Summary
 org.apache.http.HttpResponse executeGet(String uri)
           
 org.apache.http.HttpResponse executeGet(String baseUri, RequestParameters parameters)
           
 org.apache.http.HttpResponse executeMethod(org.apache.http.client.methods.HttpRequestBase method)
           
 org.apache.http.HttpResponse executePost(String uri, org.apache.http.HttpEntity payloadToSend)
          Sends the given payload to the determined URI.
 org.apache.http.HttpResponse executePost(String uri, String payloadToSend, org.apache.http.entity.ContentType contentType)
          Sends the given payload (marked to be of a specific content-type) to the determined URI.
 org.apache.http.HttpResponse executePost(String uri, org.apache.xmlbeans.XmlObject payloadToSend)
          Sends the given payload as content-type text/xml to the determined URI.
 org.apache.http.impl.client.DefaultHttpClient getHttpClientToDecorate()
           
 

Method Detail

getHttpClientToDecorate

org.apache.http.impl.client.DefaultHttpClient getHttpClientToDecorate()

executeGet

org.apache.http.HttpResponse executeGet(String uri)
                                        throws HttpClientException
Throws:
HttpClientException

executeGet

org.apache.http.HttpResponse executeGet(String baseUri,
                                        RequestParameters parameters)
                                        throws HttpClientException
Parameters:
baseUri - the target to send the GET request to.
parameters - the request/query parameters.
Returns:
the http response returned by the target.
Throws:
HttpClientException - if sending the request fails.

executePost

org.apache.http.HttpResponse executePost(String uri,
                                         org.apache.xmlbeans.XmlObject payloadToSend)
                                         throws HttpClientException
Sends the given payload as content-type text/xml to the determined URI.

Parameters:
uri - the target to send the POST request to.
payloadToSend - the POST payload as XML.
Returns:
the http response returned by the target.
Throws:
HttpClientException - if sending the request fails.

executePost

org.apache.http.HttpResponse executePost(String uri,
                                         String payloadToSend,
                                         org.apache.http.entity.ContentType contentType)
                                         throws HttpClientException
Sends the given payload (marked to be of a specific content-type) to the determined URI.

Parameters:
uri - the target to send the POST request to.
payloadToSend - the POST payload as XML.
contentType - the content-type of the payload.
Returns:
the http responsey returned by the target.
Throws:
HttpClientException - if sending the request fails.

executePost

org.apache.http.HttpResponse executePost(String uri,
                                         org.apache.http.HttpEntity payloadToSend)
                                         throws HttpClientException
Sends the given payload to the determined URI. Refer to the HTTP components docs to get more information which entity types are possible.

Parameters:
uri - the target to send the POST request to.
payloadToSend - a more generic way to send arbitrary content.
Returns:
the http response returned by the target.
Throws:
HttpClientException - if sending the request fails.

executeMethod

org.apache.http.HttpResponse executeMethod(org.apache.http.client.methods.HttpRequestBase method)
                                           throws HttpClientException
Parameters:
method -
Returns:
the http response returned by the target.
Throws:
HttpClientException


Copyright © 2012-2013 52north.org. All Rights Reserved.