Trait

endpoints.xhr

Assets

Related Doc: package xhr

Permalink

trait Assets extends algebra.Assets with Endpoints

Client that relies on the web browser to handle gzip compression

Source
Assets.scala
Linear Supertypes
Endpoints, Methods, Urls, algebra.Assets, algebra.Endpoints, Responses, Requests, algebra.Methods, algebra.Urls, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Assets
  2. Endpoints
  3. Methods
  4. Urls
  5. Assets
  6. Endpoints
  7. Responses
  8. Requests
  9. Methods
  10. Urls
  11. AnyRef
  12. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class AssetPath(path: String, name: String) extends Product with Serializable

    Permalink

    // foo/bar/baz-123abc
    AssetPath("foo/bar", "baz")
  2. type AssetRequest = AssetPath

    Permalink

    As a client, we just need to give the path of the asset we are interested in, the web browser will automatically set HTTP headers to handle gzip compression (Accept-Encoding) and decompress the response.

    As a client, we just need to give the path of the asset we are interested in, the web browser will automatically set HTTP headers to handle gzip compression (Accept-Encoding) and decompress the response.

    Definition Classes
    Assets → Assets
  3. type AssetResponse = ArrayBuffer

    Permalink

    As we request the asset via an XMLHttpRequest, we get its content as an ArrayBuffer

    As we request the asset via an XMLHttpRequest, we get its content as an ArrayBuffer

    Definition Classes
    Assets → Assets
  4. type Endpoint[A, B] = Function1[A, Result[B]]

    Permalink

    A function that takes the information needed to build a request and returns a task yielding the information carried by the response.

    A function that takes the information needed to build a request and returns a task yielding the information carried by the response.

    Definition Classes
    Endpoints → Endpoints
  5. type Method = String

    Permalink
    Definition Classes
    Methods → Methods
  6. abstract type MuxEndpoint[Req <: MuxRequest, Resp, Transport]

    Permalink
    Definition Classes
    Endpoints
  7. trait Path[A] extends Url[A]

    Permalink

    Builds an URL path from an A

    Builds an URL path from an A

    Definition Classes
    Urls
  8. implicit class PathOps[A] extends AnyRef

    Permalink
    Definition Classes
    Urls
  9. trait QueryString[A] extends AnyRef

    Permalink

    Defines how to build a query string from an A

    Defines how to build a query string from an A

    Definition Classes
    Urls
  10. implicit class QueryStringOps[A] extends AnyRef

    Permalink
    Definition Classes
    Urls
  11. trait QueryStringParam[A] extends AnyRef

    Permalink

    Defines how to build a query string parameter value from an A

    Defines how to build a query string parameter value from an A

    Definition Classes
    Urls
  12. type Request[A] = Function1[A, (XMLHttpRequest, Option[Any])]

    Permalink

    A function that takes the information A and returns an XMLHttpRequest with an optional request entity.

    A function that takes the information A and returns an XMLHttpRequest with an optional request entity. If provided, the request entity must be compatible with the send method of XMLHttpRequest.

    Definition Classes
    Endpoints → Requests
  13. type RequestEntity[A] = Function2[A, XMLHttpRequest, Any]

    Permalink

    A function that, given information A and an XMLHttpRequest, returns a request entity.

    A function that, given information A and an XMLHttpRequest, returns a request entity. Also, as a side-effect, the function can set the corresponding Content-Type header on the given XMLHttpRequest.

    Definition Classes
    Endpoints → Requests
  14. type RequestHeaders[A] = Function2[A, XMLHttpRequest, Unit]

    Permalink

    A function that takes the information A and the XMLHttpRequest and sets up some headers on it.

    A function that takes the information A and the XMLHttpRequest and sets up some headers on it.

    Definition Classes
    Endpoints → Requests
  15. type Response[A] = Function1[XMLHttpRequest, Either[Exception, A]]

    Permalink

    Attempts to decode an A from an XMLHttpRequest’s response

    Attempts to decode an A from an XMLHttpRequest’s response

    Definition Classes
    Endpoints → Responses
  16. abstract type Result[A]

    Permalink

    A value that eventually yields an A.

    A value that eventually yields an A.

    Typically, concrete representation of Result will have an instance of MonadError, so that we can perform requests (sequentially and in parallel) and recover errors.

    Definition Classes
    Endpoints
  17. trait Segment[A] extends AnyRef

    Permalink

    Defines how to build a path segment from an A

    Defines how to build a path segment from an A

    Definition Classes
    Urls
  18. trait Url[A] extends AnyRef

    Permalink

    Builds an URL from an A

    Builds an URL from an A

    Definition Classes
    Urls

Abstract Value Members

  1. abstract def digests: Map[String, String]

    Permalink
    Definition Classes
    Assets
  2. abstract def endpoint[A, B](request: Request[A], response: Response[B]): Endpoint[A, B]

    Permalink
    Definition Classes
    Endpoints
  3. abstract def muxEndpoint[Req <: MuxRequest, Resp, Transport](request: Request[Transport], response: Response[Transport]): MuxEndpoint[Req, Resp, Transport]

    Permalink
    Definition Classes
    Endpoints

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def Delete: String

    Permalink
    Definition Classes
    Methods → Methods
  5. def Get: String

    Permalink
    Definition Classes
    Methods → Methods
  6. def Post: String

    Permalink
    Definition Classes
    Methods → Methods
  7. def Put: String

    Permalink
    Definition Classes
    Methods → Methods
  8. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  9. def asset(path: String, name: String): AssetRequest

    Permalink

    Convenient constructor for building an AssetRequest from its path and name.

    Convenient constructor for building an AssetRequest from its path and name.

    myAssetsEndpoint(asset("foo/bar", "baz"))
  10. lazy val assetSegments: Path[AssetPath]

    Permalink

    Encodes an AssetPath as a request path.

    Encodes an AssetPath as a request path. Throws an exception if the asset digest is not found.

    Definition Classes
    Assets → Assets
  11. def assetsEndpoint(url: Url[AssetPath]): Endpoint[AssetRequest, AssetResponse]

    Permalink

    An endpoint for requesting assets.

    An endpoint for requesting assets.

    If the server fails to find the requested asset, this endpoint returns a failed response.

    url

    URL description

    returns

    An HTTP endpoint for requesting assets

    Definition Classes
    Assets → Assets
  12. def chainPaths[A, B](first: Path[A], second: Path[B])(implicit tupler: Tupler[A, B]): Path[Out]

    Permalink
    Definition Classes
    Urls → Urls
  13. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  14. def combineQueryStrings[A, B](first: QueryString[A], second: QueryString[B])(implicit tupler: Tupler[A, B]): QueryString[Out]

    Permalink
    Definition Classes
    Urls → Urls
  15. lazy val emptyHeaders: RequestHeaders[Unit]

    Permalink

    Sets up no headers on the given XMLHttpRequest

    Sets up no headers on the given XMLHttpRequest

    Definition Classes
    Endpoints → Requests
  16. lazy val emptyRequest: RequestEntity[Unit]

    Permalink
    Definition Classes
    Endpoints → Requests
  17. lazy val emptyResponse: Response[Unit]

    Permalink

    Successfully decodes no information from a response

    Successfully decodes no information from a response

    Definition Classes
    Endpoints → Responses
  18. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  19. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  20. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  21. final def get[A, B](url: Url[A], headers: RequestHeaders[B])(implicit tuplerAC: Tupler[A, B]): Request[Out]

    Permalink
    Definition Classes
    Requests
  22. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  23. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  24. implicit lazy val intQueryString: QueryStringParam[Int]

    Permalink
    Definition Classes
    Urls → Urls
  25. implicit lazy val intSegment: Segment[Int]

    Permalink
    Definition Classes
    Urls → Urls
  26. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  27. implicit lazy val longQueryString: QueryStringParam[Long]

    Permalink
    Definition Classes
    Urls → Urls
  28. implicit lazy val longSegment: Segment[Long]

    Permalink
    Definition Classes
    Urls → Urls
  29. final def muxPerformXhr[Req <: MuxRequest, Resp, Transport](request: Request[Transport], response: Response[Transport], req: Req)(onload: (Either[Throwable, Endpoints.muxPerformXhr.Req.Response]) ⇒ Unit, onError: (XMLHttpRequest) ⇒ Unit)(implicit encoder: Encoder[Req, Transport], decoder: Decoder[Transport, Resp]): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Endpoints
  30. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  31. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  32. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  33. def optQs[A](name: String)(implicit value: QueryStringParam[A]): QueryString[Option[A]]

    Permalink
    Definition Classes
    Urls → Urls
  34. val path: Path[Unit]

    Permalink
    Definition Classes
    Urls
  35. final def performXhr[A, B](request: Request[A], response: Response[B], a: A)(onload: (Either[Exception, B]) ⇒ Unit, onerror: (XMLHttpRequest) ⇒ Unit): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Endpoints
  36. final def post[A, B, C, AB](url: Url[A], entity: RequestEntity[B], headers: RequestHeaders[C])(implicit tuplerAB: Tupler.Aux[A, B, AB], tuplerABC: Tupler[AB, C]): Request[Out]

    Permalink
    Definition Classes
    Requests
  37. def qs[A](name: String)(implicit value: QueryStringParam[A]): QueryString[A]

    Permalink
    Definition Classes
    Urls → Urls
  38. def request[A, B, C, AB](method: Method, url: Url[A], entity: RequestEntity[B], headers: RequestHeaders[C])(implicit tuplerAB: Tupler.Aux[A, B, AB], tuplerABC: Tupler[AB, C]): Request[Out]

    Permalink
    Definition Classes
    Endpoints → Requests
  39. def segment[A](implicit s: Segment[A]): Path[A]

    Permalink
    Definition Classes
    Urls → Urls
  40. def staticPathSegment(segment: String): Path[Unit] with Serializable

    Permalink
    Definition Classes
    Urls → Urls
  41. implicit lazy val stringQueryString: QueryStringParam[String]

    Permalink
    Definition Classes
    Urls → Urls
  42. implicit lazy val stringSegment: Segment[String]

    Permalink
    Definition Classes
    Urls → Urls
  43. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  44. lazy val textResponse: Response[String]

    Permalink

    Successfully decodes string information from a response

    Successfully decodes string information from a response

    Definition Classes
    Endpoints → Responses
  45. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  46. def urlWithQueryString[A, B](path: Path[A], qs: QueryString[B])(implicit tupler: Tupler[A, B]): Url[Out]

    Permalink
    Definition Classes
    Urls → Urls
  47. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  48. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  49. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Endpoints

Inherited from Methods

Inherited from Urls

Inherited from algebra.Assets

Inherited from algebra.Endpoints

Inherited from Responses

Inherited from Requests

Inherited from algebra.Methods

Inherited from algebra.Urls

Inherited from AnyRef

Inherited from Any

Ungrouped