case class Http(clientBuilder: Builder) extends HttpExecutor with Product with Serializable
Http executor with defaults
- Alphabetic
- By Inheritance
- Http
- Serializable
- Serializable
- Product
- Equals
- HttpExecutor
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Http(clientBuilder: Builder)
Value Members
-
def
apply[T](request: Request, handler: AsyncHandler[T])(implicit executor: ExecutionContext): Future[T]
- Definition Classes
- HttpExecutor
-
def
apply[T](pair: (Request, AsyncHandler[T]))(implicit executor: ExecutionContext): Future[T]
- Definition Classes
- HttpExecutor
-
def
apply(req: Req)(implicit executor: ExecutionContext): Future[Response]
- Definition Classes
- HttpExecutor
-
lazy val
client: DefaultAsyncHttpClient
- Definition Classes
- Http → HttpExecutor
- val clientBuilder: Builder
-
def
closeAndConfigure(withBuilder: (Builder) ⇒ Builder): Http
Returns a new instance replacing the underlying
clientBuilder
with a new instance that is configured using thewithBuilder
provided.Returns a new instance replacing the underlying
clientBuilder
with a new instance that is configured using thewithBuilder
provided. The underlying client for this instance is closed before the new instance is created in order to avoid resource leaks. -
def
shutdown(): Unit
- Definition Classes
- HttpExecutor
Deprecated Value Members
-
def
configure(withBuilder: (Builder) ⇒ Builder): Http
Returns a new instance replacing the underlying
clientBuilder
with a new instance that is configured using thewithBuilder
provided.Returns a new instance replacing the underlying
clientBuilder
with a new instance that is configured using thewithBuilder
provided. The current client config is the builder's prototype.This method may cause a resource link if you've used the Http client instance you're invoking
configure
on. For that reason it's recommended to usecloseAndConfigure
instead if you need to reconfigure an existing Http instance.If you need to preserve this behavior, it is recommended that you invoke
.copy
on theHttp
instance in your code so that it's obvious that you have created another copy of the executor and that the old one should still be maintained.- Annotations
- @deprecated
- Deprecated
(Since version 0.13.0) This method is deprecated and will be removed in a future version of dispatch. Please use Http.withConfiguration or closeAndConfigure. Or, optionally, directly invoke .copy on the executor and mutate the Builder yourself.