Build pretty HTTP requests
npm install meow-httpreqts
function getDateFromApi() {
const response = await new HttpRequest()
.withUrl("some-url")
.withMethod("GET")
.withCache({
name: "api_example",
duration: 60,
})
.sendAsync();
if (!response.isPositiveStatusCode()) {
// handle error
return;
}
console.log(data);
}
``