Send any HTTP Request

Script http Verified

by fatontibeesou ยท 6/6/2022

The script

Submitted by rossmccrann Deno
Verified 386 days ago
1
export async function main(url: string, request_type: string) {
2
  const req = new Request(url, {
3
    method: request_type,
4
  });
5
  let resp = await fetch(req);
6

7
  return { response: await resp.text() };
8
}
9