final case class HttpRequest[F[_]](scheme: Scheme, host: HostPort, header: HttpRequestHeader, body: Stream[F, Byte]) extends HttpRequestOrResponse[F] with Product with Serializable
Model of Http Request sent by client.
- host
Host/port where to perform the request to
- header
Header of the request
- body
Body of the request. If empty, no body will be emitted.
- Self Type
- HttpRequest[F]
- Source
- HttpRequestOrResponse.scala
- Alphabetic
- By Inheritance
- HttpRequest
- Serializable
- Serializable
- Product
- Equals
- HttpRequestOrResponse
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Instance Constructors
Type Members
-
type
Self = HttpRequest[F]
- Definition Classes
- HttpRequest → HttpRequestOrResponse
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
+(other: String): String
- Implicit
- This member is added by an implicit conversion from HttpRequest[F] to any2stringadd[HttpRequest[F]] performed by method any2stringadd in scala.Predef.
- Definition Classes
- any2stringadd
-
def
->[B](y: B): (HttpRequest[F], B)
- Implicit
- This member is added by an implicit conversion from HttpRequest[F] to ArrowAssoc[HttpRequest[F]] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
appendHeader(header: HttpHeader, headers: HttpHeader*): Self
appends supplied headers *
appends supplied headers *
- Definition Classes
- HttpRequestOrResponse
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
val
body: Stream[F, Byte]
- Definition Classes
- HttpRequest → HttpRequestOrResponse
-
def
bodyAs[A](implicit D: BodyDecoder[A], F: Sync[F]): F[Attempt[A]]
Decodes body with supplied decoder of
A
*Decodes body with supplied decoder of
A
*- Definition Classes
- HttpRequestOrResponse
-
def
bodyAsByteVectorStream: Stream[F, ByteVector]
gets body as stream of byteVectors *
gets body as stream of byteVectors *
- Definition Classes
- HttpRequestOrResponse
- def bodyAsQuery(implicit F: Sync[F]): F[Attempt[Query]]
-
def
bodyAsString(implicit F: Sync[F]): F[Attempt[String]]
decodes body as string with encoding supplied in ContentType *
decodes body as string with encoding supplied in ContentType *
- Definition Classes
- HttpRequestOrResponse
-
lazy val
bodyIsChunked: Boolean
yields to true, if body of this request shall be chunked *
yields to true, if body of this request shall be chunked *
- Definition Classes
- HttpRequestOrResponse
-
def
bodySize: Option[Long]
gets body size, if one specified *
gets body size, if one specified *
- Definition Classes
- HttpRequestOrResponse
-
def
chunkedEncoding: Self
configures encoding as chunked *
configures encoding as chunked *
- Definition Classes
- HttpRequestOrResponse
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
def
contentType: Option[ContentType]
gets ContentType, if one specififed *
gets ContentType, if one specififed *
- Definition Classes
- HttpRequestOrResponse
-
def
ensuring(cond: (HttpRequest[F]) ⇒ Boolean, msg: ⇒ Any): HttpRequest[F]
- Implicit
- This member is added by an implicit conversion from HttpRequest[F] to Ensuring[HttpRequest[F]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: (HttpRequest[F]) ⇒ Boolean): HttpRequest[F]
- Implicit
- This member is added by an implicit conversion from HttpRequest[F] to Ensuring[HttpRequest[F]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean, msg: ⇒ Any): HttpRequest[F]
- Implicit
- This member is added by an implicit conversion from HttpRequest[F] to Ensuring[HttpRequest[F]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean): HttpRequest[F]
- Implicit
- This member is added by an implicit conversion from HttpRequest[F] to Ensuring[HttpRequest[F]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- val header: HttpRequestHeader
- val host: HostPort
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isSecure: Boolean
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- val scheme: Scheme
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
updateBody(body: Stream[F, Byte]): Self
- Attributes
- protected
- Definition Classes
- HttpRequest → HttpRequestOrResponse
-
def
updateHeaders(headers: List[HttpHeader]): Self
- Attributes
- protected
- Definition Classes
- HttpRequest → HttpRequestOrResponse
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
withBody[A](a: A)(implicit W: BodyEncoder[A], RT: RaiseThrowable[F]): Self
encodes body
A
given BodyEncoder exists *encodes body
A
given BodyEncoder exists *- Definition Classes
- HttpRequestOrResponse
-
def
withBodySize(sz: Long): Self
sets body size to supplied value *
sets body size to supplied value *
- Definition Classes
- HttpRequestOrResponse
-
def
withContentType(ct: ContentType): Self
updates content type to one specified *
updates content type to one specified *
- Definition Classes
- HttpRequestOrResponse
-
def
withHeader(header: HttpHeader, headers: HttpHeader*): Self
appends supplied headers.
appends supplied headers. Unlike
appendHeader
headers are removed if they already exists *- Definition Classes
- HttpRequestOrResponse
-
def
withHeaders[A](f: (List[HttpHeader]) ⇒ A): A
- Definition Classes
- HttpRequestOrResponse
- def withMethod(method: protocol.http.HttpMethod.Value): HttpRequest[F]
-
def
withQuery(query: Query): Self
Adds supplied query as param in the Uri
-
def
withQueryBodyEncoded(q: Query)(implicit RT: RaiseThrowable[F]): Self
Encodes query params to body as
application/x-www-form-urlencoded
content.Encodes query params to body as
application/x-www-form-urlencoded
content. That means instead of passing query as part of request, they are encoded as utf8 body. -
def
withStreamBody[A](body: Stream[F, A])(implicit E: StreamBodyEncoder[F, A]): Self
allows to stream arbitrary sized stream of
A
to remote party (i.e.allows to stream arbitrary sized stream of
A
to remote party (i.e. upload) *- Definition Classes
- HttpRequestOrResponse
-
def
withStreamBody1[A](a: ⇒ A)(implicit E: StreamBodyEncoder[F, A]): Self
like
stream
except oneA
that is streamed lazily *like
stream
except oneA
that is streamed lazily *- Definition Classes
- HttpRequestOrResponse
-
def
withUtf8Body(s: String)(implicit RT: RaiseThrowable[F]): Self
encodes body as utf8 string *
encodes body as utf8 string *
- Definition Classes
- HttpRequestOrResponse
-
def
→[B](y: B): (HttpRequest[F], B)
- Implicit
- This member is added by an implicit conversion from HttpRequest[F] to ArrowAssoc[HttpRequest[F]] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated
-
def
formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from HttpRequest[F] to StringFormat[HttpRequest[F]] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.12.16) Use
formatString.format(value)
instead ofvalue.formatted(formatString)
, or use thef""
string interpolator. In Java 15 and later,formatted
resolves to the new method in String which has reversed parameters.