|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectccc.commons.HTTP
public final class HTTP
A simple library for making HTTP requests.
Method Summary | |
---|---|
static java.lang.String |
decode(java.lang.String string,
java.lang.String charset)
Decode a string encoded with the application/x-www-form-urlencoded format. |
static MimeType |
determineMimetype(java.lang.String filename)
Guess the mime type of a file from its name. |
static java.lang.String |
encode(java.lang.String string,
java.lang.String charset)
Encode a string using the application/x-www-form-urlencoded
format. |
static java.lang.String |
get(java.lang.String host,
java.util.Map<java.lang.String,java.lang.String> params)
Perform an HTTP GET. |
static java.lang.String |
post(java.lang.String host,
java.lang.String body,
MimeType mimeType)
Perform an HTTP POST. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.String get(java.lang.String host, java.util.Map<java.lang.String,java.lang.String> params)
host
- The host to GET from.params
- The request query parameters.
public static java.lang.String post(java.lang.String host, java.lang.String body, MimeType mimeType)
host
- The host to POST to.body
- The request body.mimeType
- The body's mime-type.
public static java.lang.String encode(java.lang.String string, java.lang.String charset)
application/x-www-form-urlencoded
format.
string
- The string to encode.charset
- The charset used to generate encoded values.
public static java.lang.String decode(java.lang.String string, java.lang.String charset)
application/x-www-form-urlencoded
format.
string
- The string to decode.charset
- The charset used to interpret encoded values.
public static MimeType determineMimetype(java.lang.String filename)
filename
- The name of the file.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |