flix

0.55.0

Http

eff HttpSource

The effect used to interact with the HTTP protocol.

Operations

def request(method: String, url: String, headers: Map[String, List[String]], body: Option[String]): Response Source

Definitions

def delete(url: String, headers: Map[String, List[String]]): Response \ Http Source

Send a DELETE request to the given url with the given headers and wait for the response.

def get(url: String, headers: Map[String, List[String]]): Response \ Http Source

Send a GET request to the given url with the given headers and wait for the response.

def handle(f: a -> b \ ef): a -> Result[IoError, b] \ (ef - Http) + Net + IO Source

Handles the Http effect of the given function f.

In other words, re-interprets the Http effect using the Net and IO effects.

def head(url: String, headers: Map[String, List[String]]): Response \ Http Source

Send a HEAD request to the given url with the given headers and wait for the response.

A HEAD request is identical to a GET request except that the server should not return a message-body in the response.

def options(url: String, headers: Map[String, List[String]]): Response \ Http Source

Send an OPTIONS request to the given url with the given headers and wait for the response.

def patch(url: String, headers: Map[String, List[String]], body: String): Response \ Http Source

Send a PATCH request to the given url with the given headers and body and wait for the response.

def post(url: String, headers: Map[String, List[String]], body: String): Response \ Http Source

Send a POST request to the given url with the given headers and body and wait for the response.

def put(url: String, headers: Map[String, List[String]], body: String): Response \ Http Source

Send a PUT request to the given url with the given headers and body and wait for the response.

def trace(url: String, headers: Map[String, List[String]]): Response \ Http Source

Send a TRACE request to the given url with the given headers and wait for the response.