request
request(
url,options?):Effect<Response,RequestError>
Sends an HTTP or HTTPS request and downloads the whole response. Any status counts as a response;
check ok, or use json to require a 2xx. Stopping the script or interrupting the effect cancels
the request.
Parameters
Section titled “Parameters”string
options?
Section titled “options?”Options = {}
Returns
Section titled “Returns”Effect<Response, RequestError>
Example
Section titled “Example”import * as Http from "mira/http";
export default function* () { yield* Http.request("https://discord.com/api/webhooks/...", { method: "POST", json: { content: "Finished farming." }, });}