0
Send any HTTP Request
One script reply has been approved by the moderators Verified
Created by fatontibeesou 899 days ago Viewed 11377 times
0
Submitted by rossmccrann Deno
Verified 869 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