Package net.authorize.util
Class HttpUtility
- java.lang.Object
-
- net.authorize.util.HttpUtility
-
public final class HttpUtility extends Object
Helper methods for http calls- Author:
- ramittal
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
convertStreamToString(InputStream is)
Converts a response inputstream into a string.static <T> ANetApiResponse
postData(Environment env, ANetApiRequest request, Class<T> classType)
Posts a http request
-
-
-
Method Detail
-
postData
public static <T> ANetApiResponse postData(Environment env, ANetApiRequest request, Class<T> classType)
Posts a http request- Parameters:
env
- Env to point torequest
- Http request to sendclassType
- Expected response type if successful- Returns:
- ANetApiResponse successful or failed response
-
convertStreamToString
public static String convertStreamToString(InputStream is)
Converts a response inputstream into a string.- Parameters:
is
- input stream- Returns:
- String contents of the input stream, without BOM
-
-