play.api.libs.ws.ahc
Members list
Packages
Type members
Classlikes
Builds a valid AsyncHttpClientConfig object from config.
Builds a valid AsyncHttpClientConfig object from config.
Value parameters
- ahcConfig
-
the ahc client configuration.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Logs StandaloneWSRequest and pulls information into Curl format to an SLF4J logger.
Logs StandaloneWSRequest and pulls information into Curl format to an SLF4J logger.
Value parameters
- logger
-
an SLF4J logger
Attributes
- See also
- Companion
- object
- Supertypes
-
trait CurlFormattrait WSRequestFiltertrait WSRequestExecutor => WSRequestExecutorclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
AhcCurlRequestLogger.type
Attributes
- Supertypes
-
trait LoggerFactoryclass Objecttrait Matchableclass Any
Useful mapping code.
Useful mapping code.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Ahc client config.
Ahc client config.
Value parameters
- connectionPoolCleanerPeriod
-
the frequency to cleanup timeout idle connections
- disableUrlEncoding
-
Whether the raw URL should be used.
- idleConnectionInPoolTimeout
-
The time after which a connection that has been idle in the pool should be closed.
- keepAlive
-
keeps thread pool active, replaces allowPoolingConnection and allowSslConnectionPool
- maxConnectionLifetime
-
The maximum time that a connection should live for in the pool.
- maxConnectionsPerHost
-
The maximum number of connections to make per host. -1 means no maximum.
- maxConnectionsTotal
-
The maximum total number of connections. -1 means no maximum.
- maxNumberOfRedirects
-
The maximum number of redirects.
- maxRequestRetry
-
The maximum number of times to retry a request if it fails.
- useLaxCookieEncoder
-
whether to use LAX(no cookie name/value verification) or STRICT (verifies cookie name/value) cookie decoder
- wsClientConfig
-
The general WS client config.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Factory for creating AhcWSClientConfig, for use from Java.
Factory for creating AhcWSClientConfig, for use from Java.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
This class creates a AhcWSClientConfig object from configuration.
This class creates a AhcWSClientConfig object from configuration.
Attributes
- Supertypes
Attributes
- Supertypes
- Known subtypes
-
class StreamedResponse
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class AhcCurlRequestLogger
Attributes
- Supertypes
-
trait AhcUtilitiestrait StreamedAsyncHandler[Unit]trait AsyncHandler[Unit]class Objecttrait Matchableclass AnyShow all
A WS client backed by an AsyncHttpClient.
A WS client backed by an AsyncHttpClient.
If you need to debug AsyncHttpClient, add
Value parameters
- asyncHttpClient
-
An already configured asynchttpclient. Note that the WSClient assumes ownership of the lifecycle here, so closing the WSClient will also close asyncHttpClient.
- materializer
-
A materializer, meant to execute the stream
Attributes
- Companion
- object
- Supertypes
-
trait StandaloneWSClienttrait Closeabletrait AutoCloseableclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
A Ahc WS Request.
A Ahc WS Request.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait WSCookieConvertertrait AhcUtilitiestrait StandaloneWSRequestclass Objecttrait Matchableclass AnyShow all
A WS HTTP response backed by org.asynchttpclient.Response.
A WS HTTP response backed by org.asynchttpclient.Response.
Attributes
- Companion
- object
- Supertypes
-
trait AhcUtilitiestrait WSCookieConvertertrait DefaultBodyReadablestrait StandaloneWSResponseclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
A streamed response containing a response header and a streamable body.
A streamed response containing a response header and a streamable body.
Note that this is only usable with a stream call, i.e.
import scala.concurrent.{ ExecutionContext, Future }
import org.apache.pekko.util.ByteString
import org.apache.pekko.stream.scaladsl.Source
import play.api.libs.ws.DefaultBodyReadables._
import play.api.libs.ws.ahc.StandaloneAhcWSClient
class MyClass(ws: StandaloneAhcWSClient) {
def doIt(implicit ec: ExecutionContext): Future[String] =
ws.url("http://example.com").stream().map { response =>
val _ = response.body[Source[ByteString, _]]
??? // process source to String
}
}
Attributes
- Supertypes
-
trait CookieBuildertrait WSCookieConvertertrait StandaloneWSResponseclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Converts between AHC cookie and the WS cookie.
Converts between AHC cookie and the WS cookie.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
trait CookieBuilderclass StreamedResponseclass StandaloneAhcWSRequestclass StandaloneAhcWSResponse