-
- All Implemented Interfaces:
public class HttpUtils
Provides methods to make requests.
-
-
Method Summary
Modifier and Type Method Description static InputStream
makeRequest(@NonNull() Connect.ProviderMode providerMode, @NonNull() String path, @Nullable() Map<String, String> params, @Nullable() String checkoutId)
Sends GET/POST request to the server endpoint. static String
sendPostRequest(@NonNull() String url)
static Bitmap
downloadBitmap(String urlString)
Downloads image from provided URL static Boolean
sendCallbackRequestToPaypipe(@NonNull() String urlString, @NonNull() String shopperResultUrl)
Sends a callback request to paypipe static String
getBaseUrl(@NonNull() Connect.ProviderMode providerMode)
-
-
Method Detail
-
makeRequest
@NonNull() static InputStream makeRequest(@NonNull() Connect.ProviderMode providerMode, @NonNull() String path, @Nullable() Map<String, String> params, @Nullable() String checkoutId)
Sends GET/POST request to the server endpoint.
- Parameters:
providerMode
- To switch between test and live environmentpath
- URL path, expected format is '/v1/...params
- POST body parameters, set null for GET requestcheckoutId
- Checkout id to send logs about request, set null if no logging is needed
-
sendPostRequest
@NonNull() static String sendPostRequest(@NonNull() String url)
-
downloadBitmap
@Nullable() static Bitmap downloadBitmap(String urlString)
Downloads image from provided URL
- Parameters:
urlString
- Valid URL in string representation
-
sendCallbackRequestToPaypipe
@NonNull() static Boolean sendCallbackRequestToPaypipe(@NonNull() String urlString, @NonNull() String shopperResultUrl)
Sends a callback request to paypipe
- Parameters:
urlString
- Valid URL in string representation
-
getBaseUrl
static String getBaseUrl(@NonNull() Connect.ProviderMode providerMode)
-
-
-
-