|
Carrot2 v3.5.2
API Documentation |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.carrot2.util.httpclient.HttpUtils
public class HttpUtils
Various utilities for working with HTTP data streams.
| Nested Class Summary | |
|---|---|
static class |
HttpUtils.Response
A static holder storing HTTP response fields. |
| Method Summary | |
|---|---|
static HttpUtils.Response |
doGET(String url,
Collection<org.apache.http.NameValuePair> params,
Collection<org.apache.http.Header> headers)
Opens a HTTP/1.1 connection to the given URL using the GET method, decompresses compressed response streams, if supported by the server. |
static HttpUtils.Response |
doGET(String url,
Collection<org.apache.http.NameValuePair> params,
Collection<org.apache.http.Header> headers,
String user,
String password)
Opens a HTTP/1.1 connection to the given URL using the GET method, decompresses compressed response streams, if supported by the server. |
static HttpUtils.Response |
doGET(String url,
Collection<org.apache.http.NameValuePair> params,
Collection<org.apache.http.Header> headers,
String user,
String password,
int timeout)
Opens a HTTP/1.1 connection to the given URL using the GET method, decompresses compressed response streams, if supported by the server. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static HttpUtils.Response doGET(String url,
Collection<org.apache.http.NameValuePair> params,
Collection<org.apache.http.Header> headers)
throws IOException
url - The URL to open. The URL must be properly escaped, this method will
not perform any escaping.params - Query string parameters to be attached to the url.headers - Any extra HTTP headers to add to the request.
HttpUtils.Response object. Note that entire payload is read and
buffered so that the HTTP connection can be closed when leaving this
method.
IOException
public static HttpUtils.Response doGET(String url,
Collection<org.apache.http.NameValuePair> params,
Collection<org.apache.http.Header> headers,
String user,
String password)
throws IOException
url - The URL to open. The URL must be properly escaped, this method will
not perform any escaping.params - Query string parameters to be attached to the url.headers - Any extra HTTP headers to add to the request.user - if not null, the user name to send during Basic
Authenticationpassword - if not null, the password name to send during Basic
Authentication
HttpUtils.Response object. Note that entire payload is read and
buffered so that the HTTP connection can be closed when leaving this
method.
IOException
public static HttpUtils.Response doGET(String url,
Collection<org.apache.http.NameValuePair> params,
Collection<org.apache.http.Header> headers,
String user,
String password,
int timeout)
throws IOException
url - The URL to open. The URL must be properly escaped, this method will
not perform any escaping.params - Query string parameters to be attached to the url.headers - Any extra HTTP headers to add to the request.user - if not null, the user name to send during Basic
Authenticationpassword - if not null, the password name to send during Basic
Authentication
HttpUtils.Response object. Note that entire payload is read and
buffered so that the HTTP connection can be closed when leaving this
method.
IOException
|
Please refer to project documentation at
http://project.carrot2.org |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||