Request

tyrian.http.Request
See theRequest companion object
final case class Request[A](method: Method, headers: List[Header], url: String, body: Body, timeout: FiniteDuration, credentials: RequestCredentials, cache: RequestCache)

Describes an HTTP request.

Attributes

A

type of the successfully decoded response

body

the request body (EmptyBody or StringBody(contentType: String, body: String))

credentials

indicates if the request is using credentials

expect

tries to transform a Response[String] to a value of type A

headers

a list of request headers

method

GET, POST, PUT, PATCH, DELETE, or OPTIONS

timeout

duration to wait before giving up.

url

the url

Companion:
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

def addHeaders(newHeaders: List[Header]): Request[A]
def addHeaders(newHeaders: Header*): Request[A]
def withBody(newBody: Body): Request[A]
def withHeaders(newHeaders: List[Header]): Request[A]
def withHeaders(newHeaders: Header*): Request[A]
def withMethod(newMethod: Method): Request[A]
def withTimeout(newTimeout: FiniteDuration): Request[A]
def withUrl(newUrl: String): Request[A]

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product