RapidProHttpClient¶
-
public class
RapidProHttpClient¶ Performs all HTTP operations for the RapidPro Module
Constructors¶
RapidProHttpClient¶
-
public
RapidProHttpClient(HttpClientBuilderFactory httpClientBuilderFactory, SettingsService settingsService)¶
Methods¶
executeDelete¶
executeGet¶
-
public InputStream
executeGet(String endpoint, MediaFormat responseMediaFormat, Map<String, String> params)¶ Executes an HTTP GET Request
Parameters: - endpoint – The API endpoint
- responseMediaFormat – The desired format for the response
- params – The query parameters
Throws: - RapidProClientException –
Returns: An
InputStreamcontaining the response
executePost¶
-
public InputStream
executePost(String endpoint, byte[] body, MediaFormat contentType, MediaFormat responseMediaFormat)¶ Executes an HTTP POST Request
Parameters: - endpoint – The API endpoint
- body – The body of the request
- contentType – The content type of the request
- responseMediaFormat – The desered format for the response
Throws: - RapidProClientException –
Returns: An
InputStreamcontaining the response