Interface RestClient

All Known Implementing Classes:
HttpClientRestClient, MockRestClient

public interface RestClient
Interface for making HTTP calls.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Called to release any internally held resources.
    void
    init(Configuration configuration)
    Initializes the RestClient implementation.
    Make a request against the Pardot API.
  • Method Details

    • init

      void init(Configuration configuration)
      Initializes the RestClient implementation. Any setup or resource allocation should happen here.
      Parameters:
      configuration - Pardot Api Configuration.
    • submitRequest

      RestResponse submitRequest(Request request) throws RestException
      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.