Request

object Request
Companion:
class
trait Product
trait Mirror
class Object
trait Matchable
class Any
Request.type

Type members

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Inherited from:
Mirror

Value members

Concrete methods

def apply[A](method: Method, url: String, expect: Response[String] => Either[String, A]): Request[A]
def get[A](url: String, decoder: Decoder[A]): Request[A]

Convenience method to create a GET Request[A] and try to decode the response body from String to A.

Convenience method to create a GET Request[A] and try to decode the response body from String to A.

Type parameters:
A

the type of the successfully decoded response

Value parameters:
decoder

tries to transform the body into some value of type A

url

the url

Returns:

a GET request

def get(url: String): Request[String]

Convenience method to create a GET Request[A] and interpret the response body as String.

Convenience method to create a GET Request[A] and interpret the response body as String.

Value parameters:
url

the url

Returns:

a GET request

def post[A](url: String, body: Body, decoder: Decoder[A]): Request[A]

Convenience method to create a POST Request[A] and try to decode the response body from String to A.

Convenience method to create a POST Request[A] and try to decode the response body from String to A.

Type parameters:
A

the type of the successfully decoded response

Value parameters:
body

the body of the POST request

decoder

tries to transform the body into some value of type A

url

the url

Returns:

a POST request

def post(url: String, body: Body): Request[String]

Convenience method to create a POST Request[A] and interpret the response body as String.

Convenience method to create a POST Request[A] and interpret the response body as String.

Type parameters:
A

the type of the successfully decoded response

Value parameters:
body

the body of the POST request

decoder

tries to transform the body into some value of type A

url

the url

Returns:

a POST request