Interface RestClient
- All Known Implementing Classes:
HttpClientRestClient,MockRestClient
public interface RestClient
Interface for making HTTP calls.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Called to release any internally held resources.voidinit(Configuration configuration) Initializes the RestClient implementation.submitRequest(Request request) Make a request against the Pardot API.
-
Method Details
-
init
Initializes the RestClient implementation. Any setup or resource allocation should happen here.- Parameters:
configuration- Pardot Api Configuration.
-
submitRequest
Make a request against the Pardot API.- Parameters:
request- The request to submit.- Returns:
- The response, in UTF-8 String format.
- Throws:
RestException- When something goes wrong in an underlying implementation.
-
close
void close()Called to release any internally held resources.
-