org.lastbamboo.common.http.client
Interface HttpClientRequester

All Known Implementing Classes:
HttpClientGetRequester, HttpClientPostRequester

public interface HttpClientRequester

Interface for utility classes for issuing HTTP client requests.


Method Summary
 String request(String url)
          Issue a request with no parameters.
 String request(String baseUrl, Collection<org.littleshoot.util.Pair<String,String>> parameters)
          Writes a request to the specified address.
 String request(String baseUrl, Map<String,String> parameters)
          Writes a request to the specified address.
 String request(URL url)
          Issue a request with no parameters.
 

Method Detail

request

String request(String baseUrl,
               Collection<org.littleshoot.util.Pair<String,String>> parameters)
               throws IOException,
                      ServiceUnavailableException
Writes a request to the specified address.

Parameters:
baseUrl - The base URL to send the request to.
parameters - The request parameters.
Returns:
The response body.
Throws:
IOException - If an IO error occurs.
ServiceUnavailableException - If the service is unavailable.

request

String request(String baseUrl,
               Map<String,String> parameters)
               throws IOException,
                      ServiceUnavailableException
Writes a request to the specified address.

Parameters:
baseUrl - The base URL to send the request to.
parameters - The request parameters.
Returns:
The response body.
Throws:
IOException - If an IO error occurs.
ServiceUnavailableException - If the service is unavailable.

request

String request(String url)
               throws IOException,
                      ServiceUnavailableException
Issue a request with no parameters.

Parameters:
url - The URL to issue the request to.
Returns:
The response body.
Throws:
IOException - If an IO error occurs.
ServiceUnavailableException - If the service is unavailable.

request

String request(URL url)
               throws IOException,
                      ServiceUnavailableException
Issue a request with no parameters.

Parameters:
url - The URL to issue the request to.
Returns:
The response body.
Throws:
IOException - If any IO error occurs.
ServiceUnavailableException - If the service is unavailable.


Copyright © 2013 LittleShoot. All Rights Reserved.