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

sttp.client4.DefaultSyncBackend.scala Maven / Gradle / Ivy

The newest version!
package sttp.client4

import sttp.client4.httpclient.HttpClientSyncBackend
import sttp.client4.testing.WebSocketSyncBackendStub

object DefaultSyncBackend {

  /** Creates a default synchronous backend with the given `options`, which is currently based on
    * [[HttpClientSyncBackend]].
    */
  def apply(options: BackendOptions = BackendOptions.Default): WebSocketSyncBackend =
    HttpClientSyncBackend(options, identity, PartialFunction.empty)

  /** Create a stub backend for testing. See [[WebSocketSyncBackendStub]] for details on how to configure stub
    * responses.
    */
  def stub: WebSocketSyncBackendStub = WebSocketSyncBackendStub
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy