package ahc

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Package Members

  1. package cache

Type Members

  1. class AhcConfigBuilder extends AnyRef

    Builds a valid AsyncHttpClientConfig object from config.

  2. class AhcCurlRequestLogger extends WSRequestFilter with CurlFormat

    Logs StandaloneWSRequest and pulls information into Curl format to an SLF4J logger.

    Logs StandaloneWSRequest and pulls information into Curl format to an SLF4J logger.

    See also

    https://curl.haxx.se/

  3. class AhcLoggerFactory extends LoggerFactory
  4. trait AhcUtilities extends AnyRef

    Useful mapping code.

  5. case class AhcWSClientConfig(wsClientConfig: WSClientConfig = WSClientConfig(), maxConnectionsPerHost: Int = -1, maxConnectionsTotal: Int = -1, maxConnectionLifetime: Duration = Duration.Inf, idleConnectionInPoolTimeout: Duration = 1.minute, connectionPoolCleanerPeriod: Duration = 1.second, maxNumberOfRedirects: Int = 5, maxRequestRetry: Int = 5, disableUrlEncoding: Boolean = false, keepAlive: Boolean = true, useLaxCookieEncoder: Boolean = false, useCookieStore: Boolean = false) extends Product with Serializable

    Ahc client config.

    Ahc client config.

    wsClientConfig

    The general WS client config.

    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.

    maxConnectionLifetime

    The maximum time that a connection should live for in the pool.

    idleConnectionInPoolTimeout

    The time after which a connection that has been idle in the pool should be closed.

    connectionPoolCleanerPeriod

    the frequency to cleanup timeout idle connections

    maxNumberOfRedirects

    The maximum number of redirects.

    maxRequestRetry

    The maximum number of times to retry a request if it fails.

    disableUrlEncoding

    Whether the raw URL should be used.

    keepAlive

    keeps thread pool active, replaces allowPoolingConnection and allowSslConnectionPool

    useLaxCookieEncoder

    whether to use LAX(no cookie name/value verification) or STRICT (verifies cookie name/value) cookie decoder

  6. class AhcWSClientConfigParser extends Provider[AhcWSClientConfig]

    This class creates a AhcWSClientConfig object from configuration.

    This class creates a AhcWSClientConfig object from configuration.

    Annotations
    @Singleton()
  7. trait CookieBuilder extends WSCookieConverter
  8. trait CurlFormat extends AnyRef
  9. class DefaultStreamedAsyncHandler[T] extends StreamedAsyncHandler[Unit] with AhcUtilities
  10. class StandaloneAhcWSClient extends StandaloneWSClient

    A WS client backed by an AsyncHttpClient.

    A WS client backed by an AsyncHttpClient.

    If you need to debug AsyncHttpClient, add <logger name="play.shaded.ahc.org.asynchttpclient" level="DEBUG" /> into your conf/logback.xml file.

  11. case class StandaloneAhcWSRequest(client: StandaloneAhcWSClient, url: String, method: String = "GET", body: WSBody = EmptyBody, headers: Map[String, Seq[String]] = TreeMap()(CaseInsensitiveOrdered), queryString: Map[String, Seq[String]] = Map.empty, cookies: Seq[WSCookie] = Seq.empty, calc: Option[WSSignatureCalculator] = None, auth: Option[(String, String, WSAuthScheme)] = None, followRedirects: Option[Boolean] = None, requestTimeout: Option[Duration] = None, virtualHost: Option[String] = None, proxyServer: Option[WSProxyServer] = None, disableUrlEncoding: Option[Boolean] = None, filters: Seq[WSRequestFilter] = Nil)(implicit materializer: Materializer) extends StandaloneWSRequest with AhcUtilities with WSCookieConverter with Product with Serializable

    A Ahc WS Request.

  12. class StandaloneAhcWSResponse extends StandaloneWSResponse with DefaultBodyReadables with WSCookieConverter with AhcUtilities

    A WS HTTP response backed by org.asynchttpclient.Response.

  13. class StreamedResponse extends StandaloneWSResponse with CookieBuilder

    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
        }
    }
  14. case class StreamedState(statusCode: Int = -1, statusText: String = "", uriOption: Option[URI] = None, responseHeaders: Map[String, Seq[String]] = Map.empty, publisher: Publisher[HttpResponseBodyPart] = EmptyPublisher) extends Product with Serializable
  15. trait WSCookieConverter extends AnyRef

    Converts between AHC cookie and the WS cookie.

Value Members

  1. object AhcCurlRequestLogger
  2. object AhcWSClientConfigFactory

    Factory for creating AhcWSClientConfig, for use from Java.

  3. object StandaloneAhcWSClient
  4. object StandaloneAhcWSResponse

Ungrouped