Send any HTTP Request
One script reply has been approved by the moderators Verified
Created by fatontibeesou 1299 days ago Picked 34 times
Submitted by rossmccrann Deno
Verified 233 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