tyrian.http

package tyrian.http

Members list

Concise view

Type members

Classlikes

enum Body

The body of a request

The body of a request

Attributes

Companion:
object
Graph
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Known subtypes
object Body

Attributes

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

Attributes

Graph
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

Attributes

name

header field name

value

header field value

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
object Http

Send HTTP requests as a command

Send HTTP requests as a command

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Http.type

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

Graph
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Known subtypes
enum Method

An HTTP method

An HTTP method

Attributes

Graph
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
final case class Request[A](method: Method, headers: List[Header], url: String, body: Body, timeout: FiniteDuration, withCredentials: Boolean)

Describes an HTTP request.

Describes an HTTP request.

Attributes

A

type of the successfully decoded response

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
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
object Request

Attributes

Companion:
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Request.type
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.

Attributes

A

type of the response body

body

the response body

headers

the response headers

status

the status code

url

the url

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

The response status code

The response status code

Attributes

code

the status code

message

the status message

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

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.

Attributes

Msg

Message type of the successfully decoded response