import { proxyRequest } from "https://deno.land/x/fathym_common@v0.2.166/src/common/http/proxyRequest.ts";
Proxies the request to a remote server.
Examples
From direct import
From direct import
import { proxyRequest } from '@fathym/common/http';
const resp = await proxyRequest(req, 'https://api.example.com', 'https://localhost:8080', '/api',
{ 'Authorization': 'Bearer token' });
From common import
From common import
import { proxyRequest } from '@fathym/common';
const resp = await proxyRequest(req, 'https://api.example.com', 'https://localhost:8080', '/api',
{ 'Authorization': 'Bearer token' });
Parameters
req: Request
The request to be proxied.