All Downloads are FREE. Search and download functionalities are using the official Maven repository.

algoliasearch.config.Requester.scala Maven / Gradle / Ivy

There is a newer version: 2.9.2
Show newest version
package algoliasearch.config

/** Represents a mechanism for executing HTTP requests and deserializing responses using JSON4S. It provides methods for
  * making requests and returning the desired object representation. Implementations of this trait should ensure proper
  * resource management.
  */
trait Requester extends AutoCloseable {

  /** Executes an HTTP request and deserializes the response into a specified Scala type.
    *
    * @param httpRequest
    *   The HTTP request to be executed.
    * @param requestOptions
    *   Optional request options.
    * @tparam T
    *   The type of the returned object.
    * @return
    *   The deserialized response.
    */
  def execute[T: Manifest](
      httpRequest: HttpRequest,
      requestOptions: Option[RequestOptions]
  ): T
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy