tyrian.http

package tyrian.http

Members list

Type members

Classlikes

enum Body

The body of a request

The body of a request

Attributes

Companion
object
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes
case PlainText
object Body

Attributes

Companion
enum
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Body.type
object Decoder

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Decoder.type
final case class Header(name: String, value: String)

A request header

A request header

Value parameters

name

header field name

value

header field value

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Http

Send HTTP requests as a command

Send HTTP requests as a command

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Http.type
enum HttpError

An Error will be returned if something goes wrong with an HTTP request.

An Error will be returned if something goes wrong with an HTTP request.

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes
case BadRequest
enum Method

An HTTP method

An HTTP method

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class Request[A](method: Method, headers: List[Header], url: String, body: Body, timeout: FiniteDuration, credentials: RequestCredentials, cache: RequestCache)

Describes an HTTP request.

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))

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

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Request

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Request.type

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class Response(url: String, status: Status, headers: Map[String, String], body: String)

The response from an HTTP request.

The response from an HTTP request.

Type parameters

A

type of the response body

Value parameters

body

the response body

headers

the response headers

status

the status code

url

the url

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class Status(code: Int, message: String)

The response status code

The response status code

Value parameters

code

the status code

message

the status message

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Types

opaque type Decoder[Msg]

Tries to transform an response body or http error into to a value of type Msg.

Tries to transform an response body or http error into to a value of type Msg.

Type parameters

Msg

Message type of the successfully decoded response

Attributes