utils
Class HttpClient

java.lang.Object
  extended by utils.HttpClient

public class HttpClient
extends java.lang.Object

HttpClient utils


Constructor Summary
HttpClient()
           
 
Method Summary
static java.lang.String getRequest(java.lang.String url)
          get request
static org.codehaus.jackson.JsonNode postRequest(java.lang.String url, org.apache.commons.httpclient.NameValuePair[] parameters)
          post request
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpClient

public HttpClient()
Method Detail

postRequest

public static org.codehaus.jackson.JsonNode postRequest(java.lang.String url,
                                                        org.apache.commons.httpclient.NameValuePair[] parameters)
                                                 throws org.apache.http.HttpException,
                                                        java.io.IOException
post request

Parameters:
url - url for request
parameters - parameters for request
Returns:
response in JsonNode format
Throws:
org.apache.http.HttpException - request return code different 200
java.io.IOException - request is not correct

getRequest

public static java.lang.String getRequest(java.lang.String url)
                                   throws org.apache.http.HttpException,
                                          java.io.IOException
get request

Parameters:
url - url for request
Returns:
response in JsonNode format
Throws:
org.apache.http.HttpException - request return code different 200
java.io.IOException - request is not correct