final case class Status(code: Int)(reason: String) extends Ordered[Status] with Product with Serializable
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.
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- Status
- Serializable
- Serializable
- Product
- Equals
- Ordered
- Comparable
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Value Members
-
def
<(that: Status): Boolean
- Definition Classes
- Ordered
-
def
<=(that: Status): Boolean
- Definition Classes
- Ordered
-
def
>(that: Status): Boolean
- Definition Classes
- Ordered
-
def
>=(that: Status): Boolean
- Definition Classes
- Ordered
- val code: Int
-
def
compare(that: Status): Int
- Definition Classes
- Status → Ordered
-
def
compareTo(that: Status): Int
- Definition Classes
- Ordered → Comparable
- def isSuccess: Boolean
- val reason: String
- val responseClass: ResponseClass
- def unapply[F[_]](msg: HttpResponse[F]): Option[HttpResponse[F]]
- def withReason(reason: String): Status