object Http extends Http
Singleton default Http executor, can be used directly or altered
with its case-class copy
- Alphabetic
- By Inheritance
- Http
- Http
- Serializable
- Serializable
- Product
- Equals
- HttpExecutor
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
val
client: AsyncHttpClient
- Definition Classes
- Http → HttpExecutor
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
closeAndConfigure(withBuilder: (Builder) ⇒ Builder): Http
Returns a new instance replacing the underlying
client
with a new instance that is configured using thewithBuilder
provided.Returns a new instance replacing the underlying
client
with a new instance that is configured using thewithBuilder
provided. The current client config is the builder's prototype. The underlying client for this instance is closed before the new instance is created.- Definition Classes
- Http
-
lazy val
default: Http
The default executor.
The default executor. Invoking this val will shutdown the client created by the Http singleton.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
shutdown(): Unit
- Definition Classes
- HttpExecutor
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
apply[T](request: Request, handler: AsyncHandler[T])(implicit executor: ExecutionContext): Future[T]
- Definition Classes
- Http → HttpExecutor
- Annotations
- @deprecated
- Deprecated
(Since version 0.12.2) Using the Http singleton directly is deprecated and will be removed in a future version of dispatch. Please switch to invoking Http.default for using a globally accessible default Http client.
-
def
apply[T](pair: (Request, AsyncHandler[T]))(implicit executor: ExecutionContext): Future[T]
- Definition Classes
- Http → HttpExecutor
- Annotations
- @deprecated
- Deprecated
(Since version 0.12.2) Using the Http singleton directly is deprecated and will be removed in a future version of dispatch. Please switch to invoking Http.default for using a globally accessible default Http client.
-
def
apply(req: Req)(implicit executor: ExecutionContext): Future[Response]
- Definition Classes
- Http → HttpExecutor
- Annotations
- @deprecated
- Deprecated
(Since version 0.12.2) Using the Http singleton directly is deprecated and will be removed in a future version of dispatch. Please switch to invoking Http.default for using a globally accessible default Http client.
-
def
configure(withBuilder: (Builder) ⇒ Builder): Http
Returns a new instance replacing the underlying
client
with a new instance that is configured using thewithBuilder
provided.Returns a new instance replacing the underlying
client
with a new instance that is configured using thewithBuilder
provided. The current client config is the builder's prototype.As of Dispatch 0.12.2, it is recommended that you use closeAndConfigure instead to prevent the automatic resource link that using this method will cause. However, if you expect to be able to continue using this Http instance after
In Dispatch 0.13.x, this will be changed such that it only causes a resource link if you've actually used the Http client, but the method is still deprecated and is one that we're planning to remove. If you need this functionality in the long term, it is recommended that you change your code to invoke the
.copy
method on theHttp
case class directly.- Definition Classes
- Http
- Annotations
- @deprecated
- Deprecated
(Since version 0.12.2) This method is deprecated and will be removed in a future version of dispatch. This method is known to cause a resource leak in Dispatch 0.12.x. If you don't need to continue using the original Http instance after invoking this, you should switch to using closeAndConfigure.