import { fetchAPI } from "https://deno.land/x/revolt_api@0.4.0/mod.ts";
Fetch a resource from the API. It returns a Promise that resolves to the Response to that Request, whether it is successful or not.
Mostly equivilent to the build in fetch
function, but typed.
changes:
- allows a base to be specified
- url queries will be typed added to the request
- will type error if the route expects a body
- the method for the request will be typed
- the result is typed for json output