Package com.targomo.client.api.util
Class CurlUtil
java.lang.Object
com.targomo.client.api.util.CurlUtil
Created by gerb on 27.02.18.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
CurlUtil
public CurlUtil()
-
-
Method Details
-
buildCurlRequest
-
buildCurlRequest
public static String buildCurlRequest(String method, String url, String queryString, List<String> headers, String body) Build a curl request. Only checks for body if the method is 'POST'.- Parameters:
method- The method of the requesturl- The base url of both the host and endpointqueryString- All query parameters as a string joined using '&'headers- A list of strings of request headers in the format 'Key: Value'body- The request body. If there is no body should be an empty string- Returns:
- A full curl request
-