com.belerweb.social.http
Class Http

java.lang.Object
  extended by com.belerweb.social.http.Http

public final class Http
extends Object


Field Summary
static org.apache.http.client.HttpClient CLIENT
           
 
Constructor Summary
Http()
           
 
Method Summary
static String get(String uri, org.apache.http.Header... headers)
           
static String get(String uri, List<org.apache.http.NameValuePair> params)
           
static boolean isRequestSuccess(org.apache.http.HttpResponse response)
           
static org.apache.http.client.HttpClient newClient()
           
static String post(String uri)
           
static String post(String uri, org.apache.http.HttpEntity postBody, org.apache.http.Header... headers)
           
static String post(String uri, List<org.apache.http.NameValuePair> params, String charset, org.apache.http.Header... headers)
           
static String randomAgent()
           
static String responseToString(org.apache.http.HttpResponse response)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLIENT

public static final org.apache.http.client.HttpClient CLIENT
Constructor Detail

Http

public Http()
Method Detail

get

public static String get(String uri,
                         List<org.apache.http.NameValuePair> params)
                  throws HttpException
Throws:
HttpException

get

public static String get(String uri,
                         org.apache.http.Header... headers)
                  throws HttpException
Throws:
HttpException

post

public static String post(String uri,
                          org.apache.http.HttpEntity postBody,
                          org.apache.http.Header... headers)
                   throws HttpException
Throws:
HttpException

post

public static String post(String uri,
                          List<org.apache.http.NameValuePair> params,
                          String charset,
                          org.apache.http.Header... headers)
                   throws HttpException
Throws:
HttpException

post

public static String post(String uri)
                   throws HttpException
Throws:
HttpException

isRequestSuccess

public static boolean isRequestSuccess(org.apache.http.HttpResponse response)
                                throws HttpException
Throws:
HttpException

responseToString

public static String responseToString(org.apache.http.HttpResponse response)
                               throws HttpException
Throws:
HttpException

randomAgent

public static String randomAgent()

newClient

public static org.apache.http.client.HttpClient newClient()


Copyright © 2014. All Rights Reserved.