package http

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. http
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. trait AllInstances extends MultipartInstances with EntityEncoderInstances with EntityDecoderInstances with MethodInstances
  2. trait AllSyntax extends MultipartSyntax with EntityEncoderSyntax with DecodeResultSyntax
  3. final case class Boundary(value: String) extends AnyVal with Product with Serializable

    Boundary marker for batch or changesets.

  4. final case class ChangeSet[F[_]](parts: Seq[SinglePart[F]], boundary: Boundary = Boundary.mkBoundary("changeset_"), xtra: HttpHeaders = HttpHeaders.empty) extends Part with Product with Serializable

    Changeset "part".

    Changeset "part". Headers are written for Content-Type and Content-Transfer-Encoding at the start of each Part's boundary. These can be overwritten or added to using xtra. A random Content-ID is added if one is not present.

    xtra

    Extra headers after the changeset boundary but not in the actual requests.

  5. final case class Client[F[_]](open: Kleisli[F, HttpRequest[F], DisposableResponse[F]], dispose: F[Unit])(implicit F: MonadError[F, Throwable]) extends Product with Serializable

    A thin layer over a HTTP service that adds implcit convenience for finding response decoders and handling unsuccessful (non 200 range) responses.

    A thin layer over a HTTP service that adds implcit convenience for finding response decoders and handling unsuccessful (non 200 range) responses. Based on http4s design. The methods in this class do not deal with exceptions/errors but does, when expecting a successful result, translate a non-200 saus to an UnexpectedStatus exception and hence uses MonadError.raiseError to signal the error.

  6. final case class CommunicationsFailure(details: String, cause: Option[Throwable] = None) extends MessageFailure with Product with Serializable

    Error for a Client to throw when something happens underneath it e.g.

    Error for a Client to throw when something happens underneath it e.g. in the OS.

  7. trait ConnectionInfo extends Object

    User provided configuration informmation.

    User provided configuration informmation.

    Annotations
    @ScalaJSDefined() @RawJSType()
  8. sealed abstract class DecodeFailure extends MessageFailure

    Error for a Client when decoding of a returned message fails.

  9. type DecodeResult[F[_], A] = EitherT[F, DecodeFailure, A]

    When decoding a response body, either you get an A or a DecodeFailure.

    When decoding a response body, either you get an A or a DecodeFailure. The effect may also carry an exception. EitherT has a bunch of combinators.

    See also

    https://typelevel.org/cats/api/cats/data/EitherT.html

  10. final case class DecodeResultOps[F[_], T](dr: DecodeResult[F, T])(implicit F: MonadError[F, Throwable]) extends Product with Serializable
  11. trait DecodeResultSyntax extends AnyRef
  12. final case class DisposableResponse[F[_]](response: HttpResponse[F], dispose: F[Unit]) extends Product with Serializable

    A response that allows the response object to used then calls an effect after its has been consumed via apply.

    A response that allows the response object to used then calls an effect after its has been consumed via apply. This is essentially a resource management hook.

    To do

    Use some type of bracket capability, is that universal?

  13. type Entity = IO[String]

    Non-streaming but good enough for our needs.

    Non-streaming but good enough for our needs. IO is used explicitly but since we have strict bodies for dynamics, why not use "Id" in the short term? Entity is the body part of a Message.

    To do

    Make F so we can use Id or something simpler.

  14. trait EntityDecoder[F[_], T] extends AnyRef

    Decode a Message to a DecodeResult.

    Decode a Message to a DecodeResult. After decoding you have a DecodeResult which is co-product (either) an error or a value. You can fold on the decode result to work with either side e.g. mydecoderesult.fold(throw _, identity).

    Annotations
    @implicitNotFound( ... )
  15. trait EntityDecoderInstances extends AnyRef

    EntityDecoder instances specific to the type you want to "output" from the decoding process.

    EntityDecoder instances specific to the type you want to "output" from the decoding process. Currently tied to IO.

  16. trait EntityEncoder[A] extends AnyRef

    Simple encoder that encodes to a strict value.

    Simple encoder that encodes to a strict value.

    Annotations
    @implicitNotFound( ... )
  17. trait EntityEncoderInstances extends AnyRef
  18. final case class EntityEncoderOps[A](a: A) extends AnyVal with Product with Serializable
  19. trait EntityEncoderSyntax extends AnyRef
  20. trait HTTPExceptionsInstances extends AnyRef
  21. type HttpHeaders = Map[String, Seq[String]]

    Basic headers are a dict of strings.

  22. case class HttpRequest[F[_]](method: Method, path: String, headers: HttpHeaders = HttpHeaders.empty, body: Entity = Entity.empty) extends Message[F] with Product with Serializable

    A low-level request.

  23. case class HttpResponse[F[_]](status: Status, headers: HttpHeaders, body: Entity) extends Message[F] with Product with Serializable

    A low-level response.

  24. type HttpService[F[_]] = Kleisli[F, HttpRequest[F], HttpResponse[F]]
  25. trait Message[F[_]] extends MessageOps[F]

    Superclass of requests and responses.

    Superclass of requests and responses. Holds headers and a body at a minimum.

  26. final case class MessageBodyFailure(details: String, cause: Option[Throwable] = None) extends DecodeFailure with Product with Serializable
  27. sealed abstract class MessageFailure extends RuntimeException

    Message failure in the http layer.

  28. trait MessageOps[F[_]] extends Any

    Basic HTTP client code based mostly on http4s.

  29. sealed case class Method extends Product with Serializable

    Wrapper type for a Method.

  30. trait MethodInstances extends AnyRef
  31. type Middleware[F[_]] = (Client[F]) ⇒ Client[F]
  32. final case class MissingExpectedHeader(details: String, cause: Option[Throwable] = None) extends DecodeFailure with Product with Serializable
  33. final case class Multipart(parts: Seq[Part], boundary: Boundary = Boundary.mkBoundary()) extends Product with Serializable

    Multipart composed of a list of parts: individual requests and changesets.

    Multipart composed of a list of parts: individual requests and changesets. Despite its name, it does not inherit from Part.

    parts

    Sequence of Parts.

    boundary

    Batch boundary.

  34. trait MultipartInstances extends AnyRef
  35. final case class MultipartOps[F[_]](r: HttpRequest[F]) extends Product with Serializable
  36. trait MultipartSyntax extends AnyRef
  37. trait NextLinkResponse[A] extends Object

    Use this when you *only* care about the @odata.nextLink link.

    Use this when you *only* care about the @odata.nextLink link.

    Annotations
    @RawJSType() @native()
  38. case class NodeFetchClientOptions(timeoutInMillis: Int = 0, compress: Boolean = true) extends Product with Serializable
  39. final case class OnlyOneExpected(details: String, cause: Option[Throwable] = None) extends DecodeFailure with Product with Serializable
  40. sealed trait Part extends AnyRef

    One part of a multipart request.

    One part of a multipart request. There are only two subtypes, one for a request directly in the multipart message and the other for a changeset. Deletes, updates and inserts must be in a changeset.

  41. trait RenderConstants extends AnyRef
  42. trait Retry extends LazyLogger
  43. trait RetryMiddleware extends AnyRef

    Implement retry transparently for a Client as Middleware.

    Implement retry transparently for a Client as Middleware. For dynamics, this is a bit hard as the server could be busy but returns 500. Otherwise, other 500 errors maybe or maybe not should be retryable. The retry policies herein are based on specific statuses, specific OS likely retryable errors and errors caused potentially by mangled message bodies.

    The new dynamics governer limits are in place and these retry policies take them into account via status TooManyRequests:

    See also

    https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/api-limits

  44. type RetryPolicy[F[_], A] = (F[A]) ⇒ F[A]

    Retry policies are added to an effect so that when run, a retry occurs as needed.

  45. final case class SinglePart[F[_]](request: HttpRequest[F], xtra: HttpHeaders = HttpHeaders.empty) extends Part with Product with Serializable

    Single request.

    Single request. Either standalone or in a changeset. Content-Type and Content-Transfer-Encoding is added to each part prior to the request being written. Headers in request can be overriden and added to using xtra.

    xtra

    Extra headers after the boundary but not in the actual request.

  46. trait SingleValueResponse[A <: Any] extends Object

    The shape when using navigation properties to a single value it is returned in the fieldname "value".

    The shape when using navigation properties to a single value it is returned in the fieldname "value".

    Annotations
    @RawJSType() @native()
  47. final case class Status(code: Int)(reason: String) extends Ordered[Status] with Product with Serializable

    Represents a Status.

    Represents a Status. Allows us to manage status values in web calls more easily. Provide a way to match a response to a status or other criteria in a DSL-sort of way.

    client.fetch(...) {
     case Status(200)(response) => decode response
     case failedResponse => Task.fail(...)
    }

    Copied from http4s.

  48. type StreamingClient[F[_], A] = (Stream[F, HttpRequest[F]]) ⇒ Stream[F, F[A]]
  49. final case class UnexpectedStatus[F[_]](status: Status, request: Option[HttpRequest[F]] = None, response: Option[HttpResponse[F]] = None) extends RuntimeException with Product with Serializable

    Unexpected status returned, the original request and response may be available.

    Unexpected status returned, the original request and response may be available. Potentiailly having the request/response available forces the F parameter to be available.

  50. trait ValueArrayResponse[A <: Any] extends Object with NextLinkResponse[A]

    General response envelope when an array of values is returned in "values"..

    General response envelope when an array of values is returned in "values".. Use A=_ if you do not care about the values. This is only used to process return bodies and find the "value" array that may, or may not be there. You get this when querying for a list or when navigating to a collection valued property. If you use $expand on a collection value property it is listed under its attribute name on the target entity and is *not* under the "value" fieldname.

    Annotations
    @RawJSType() @native()
  51. type Service[F, A, B] = Kleisli[IO, A, B]
    Annotations
    @deprecated
    Deprecated

    (Since version 0.1.0) Use Kleisli directly e.g. Kleisli[F, A, B]

Value Members

  1. object Boundary extends RenderConstants with Serializable
  2. object ChangeSet extends Serializable
  3. object DecodeResult

    Helper objects to make creating DecodeResults easier.

  4. object Entity
  5. object EntityDecoder
  6. object EntityEncoder
  7. object HttpHeaders
  8. object Method extends Serializable
  9. object Multipart extends RenderConstants with Serializable
  10. object NodeFetch
  11. object NodeFetchClient extends LazyLogger
  12. object OData
  13. object Part
  14. object RetryMiddleware extends RetryMiddleware
  15. object Status extends Serializable
  16. object implicits extends AllSyntax with AllInstances
  17. object instances
  18. object retry extends Retry
  19. object syntax

Inherited from AnyRef

Inherited from Any

Ungrouped