Request

final case class Request[A](method: Method, headers: List[Header], url: String, body: Body, timeout: FiniteDuration, withCredentials: Boolean)

Describes an HTTP request.

Type parameters:
A

type of the successfully decoded response

Value parameters:
body

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

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

withCredentials

indicates if the request is using credentials

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

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

Inherited from:
Product