net.authorize.util
Class HttpUtility

java.lang.Object
  extended by net.authorize.util.HttpUtility

public final class HttpUtility
extends Object

Helper methods for http calls

Author:
ramittal

Method Summary
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

postData

public static <T> ANetApiResponse postData(Environment env,
                                           ANetApiRequest request,
                                           Class<T> classType)
Posts a http request

Parameters:
env - Env to point to
request - Http request to send
classType - 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


Copyright © 2014. All Rights Reserved.