|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.heroku.api.http.HttpUtil
public class HttpUtil
HTTP related utilities.
Constructor Summary | |
---|---|
HttpUtil()
|
Method Summary | |
---|---|
static String |
encodeIncludingSpecialCharacters(String toEncode)
Some calls in the Heroku API decode strings in a different way from URLEncoder. |
static String |
encodeParameters(RequestConfig config,
Heroku.RequestKey... keys)
URL encode request paramaters from a RequestConfig . |
static byte[] |
getBytes(InputStream in)
Converts an InputStream to a byte array |
static String |
getUTF8String(byte[] in)
|
static RequestFailedException |
insufficientPrivileges(int code,
byte[] bytes)
|
static UnsupportedOperationException |
noBody()
|
static URL |
toURL(String url)
|
static String |
urlencode(String toEncode,
String messageIfFails)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HttpUtil()
Method Detail |
---|
public static String encodeParameters(RequestConfig config, Heroku.RequestKey... keys)
RequestConfig
.
config
- Name/value pairs for a HTTP request.keys
- List of keys in the config to encode.
public static String encodeIncludingSpecialCharacters(String toEncode)
config
- Name/value pairs for a HTTP request.keys
- List of keys in the config to encode.
public static String urlencode(String toEncode, String messageIfFails)
public static UnsupportedOperationException noBody()
public static URL toURL(String url)
public static RequestFailedException insufficientPrivileges(int code, byte[] bytes)
public static byte[] getBytes(InputStream in)
InputStream
to a byte array
in
-
public static String getUTF8String(byte[] in)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |