HttpWithResult
eff HttpWithResultSourceThe effect used to interact with the HTTP protocol.
Operations
def request(method: String, url: String, headers: Map[String, List[String]], body: Option[String]): Result[IoError, Response] \ HttpWithResult
SourceDefinitions
def delete(url: String, headers: Map[String, List[String]]): Result[IoError, Response] \ HttpWithResult
SourceSend 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]]): Result[IoError, Response] \ HttpWithResult
SourceSend a GET request to the given url with the given headers and wait for the response.
def handle(f: a -> b \ ef): a -> b \ (ef - HttpWithResult) + IO
SourceHandles the HttpWithResult effect of the given function f.
In other words, re-interprets the HttpWithResult effect using the IO effect.
def head(url: String, headers: Map[String, List[String]]): Result[IoError, Response] \ HttpWithResult
SourceSend 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]]): Result[IoError, Response] \ HttpWithResult
SourceSend 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): Result[IoError, Response] \ HttpWithResult
SourceSend 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): Result[IoError, Response] \ HttpWithResult
SourceSend 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): Result[IoError, Response] \ HttpWithResult
SourceSend a PUT request to the given url with the given headers and body and wait for the response.
def runWithIO(f: Unit -> a \ ef): a \ (ef - HttpWithResult) + IO
SourceRuns the HttpWithResult effect of the given function f.
In other words, re-interprets the HttpWithResult effect using the IO effect.
def trace(url: String, headers: Map[String, List[String]]): Result[IoError, Response] \ HttpWithResult
SourceSend a TRACE request to the given url with the given headers and wait for the response.