|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface HttpManager
Basic HttpManager interface for low-level control over HTTP requests. Instance available via HttpManagerFactory
.
NOTE: No caching is performed when using these methods; for cached responses use one of the specific managers.
Field Summary | |
---|---|
static String |
CONTENT_ENCODING
|
static String |
CONTENT_LENGTH
|
static String |
CONTENT_TYPE
|
Method Summary | |
---|---|
HttpResponse |
get(URL url)
Sends a GET request. |
HttpResponse |
headRequest(URL url)
Sends a HEAD request. |
HttpResponse |
post(URL url,
String charset,
NameValuePair... nameValuePairs)
Sends a POST request. |
HttpResponse |
postFile(URL url,
File file)
Uploads a file using a multipart POST request. |
HttpResponse |
putFile(URL url,
File file)
Uploads a file using a PUT request. |
Field Detail |
---|
static final String CONTENT_TYPE
static final String CONTENT_ENCODING
static final String CONTENT_LENGTH
Method Detail |
---|
HttpResponse get(URL url)
url
- the URL to open a connection to.HttpResponse post(URL url, String charset, NameValuePair... nameValuePairs)
url
- the URL to post to.charset
- the character set that will be used to encode POST datanameValuePairs
- fields to send with the post request
HttpResponse postFile(URL url, File file)
uploadFileFieldName
attribute of the
httpUpload
configuration file element.
url
- the URL to upload to.file
- the file to upload.
HttpResponse putFile(URL url, File file)
NOTE: As noted in HttpLayer.SUN
documentation, this will always use a HttpClient connection.
url
- the URL to upload to.file
- the file to upload.
HttpResponse headRequest(URL url)
url
- the URL to request.
|
Copyright (c) 2005-2012 Ephox Pty Ltd. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |