HttpResponse

harness.http.client.HttpResponse
See theHttpResponse companion object
sealed abstract class HttpResponse[ResponseBody] extends Builder1[Any, ResponseBody]

Attributes

Companion
object
Graph
Supertypes
trait Builder1[Any, ResponseBody]
trait Builder2[Any, ResponseBody, HError]
class Object
trait Matchable
class Any
Known subtypes
class Cached[ResponseBody]
class Const[ResponseBody]
Self type
HttpResponse[ResponseBody]

Members list

Value members

Abstract methods

def bodyAsString: HRIO[Logger, String]

Concrete methods

final def contentLengthInt: HTask[Option[Int]]
def findHeader[T](header: String)(implicit decoder: StringDecoder[T]): HTask[Option[T]]
def findJsonHeader[T](header: String)(using evidence$2: JsonDecoder[T]): HTask[Option[T]]
final def getContentLength: HTask[Long]
final def getContentLengthInt: HTask[Int]
def getHeader[T](header: String)(implicit decoder: StringDecoder[T]): HTask[T]
def getHeaderValues(header: String): HTask[List[String]]
def getJsonHeader[T](header: String)(using evidence$1: JsonDecoder[T]): HTask[T]
def show: HRIO[Logger, String]
def showHeaders: String
final def toResponseStringBody: HRIO[Logger, HttpResponse[String]]
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any
final def withBody[ResponseBody2](body: ResponseBody2, bodyOps: BodyOps[ResponseBody2]): HttpResponse[ResponseBody2]

Inherited methods

override protected def decodeError(response: HttpResponse[String]): HError

Attributes

Definition Classes
Inherited from:
Builder1
def encodedBody[T](using evidence$3: StringDecoder[T]): ZIO[GetResponseR & Logger, ErrorT, T]

Attributes

Inherited from:
Builder2
final def forwardBodyToPath(path: Path): HRIO[GetResponseR, Long]

Attributes

Inherited from:
Builder2
final def getResponseStringBody: HRIO[GetResponseR & Logger, HttpResponse[String]]

Attributes

Inherited from:
Builder2
final def hErrorOrJsonResponse[E](using evidence$2: JsonDecoder[E]): Builder2[GetResponseR, ResponseT, HErrorOr[E]]

Attributes

Inherited from:
Builder1
final def hErrorOrResponse[E](using evidence$1: StringDecoder[E]): Builder2[GetResponseR, ResponseT, HErrorOr[E]]

Attributes

Inherited from:
Builder1
final def hErrorResponse: Builder2[GetResponseR, ResponseT, HError]

Attributes

Inherited from:
Builder1
def jsonBody[T](using evidence$4: JsonDecoder[T]): ZIO[GetResponseR & Logger, ErrorT, T]

Attributes

Inherited from:
Builder2
def stringBody: ZIO[GetResponseR & Logger, ErrorT, String]

Attributes

Inherited from:
Builder2
def unit2xx: ZIO[GetResponseR & Logger, ErrorT, Unit]

Attributes

Inherited from:
Builder2

Concrete fields

final val body: ResponseBody
final val contentLength: Option[Long]
final val headers: Map[String, List[String]]
final val responseCode: HttpCode
final val result: Result[ResponseBody]