We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ad8202a commit 94a5ebaCopy full SHA for 94a5eba
packages/sdk/src/utils/fetch-agent.ts
@@ -18,7 +18,10 @@ export class FetchAgent extends Agent {
18
const fakeSocket = new net.Socket({ writable: false });
19
fakeSocket.readable = true;
20
21
- const resp = await this.fetchFn((<any>opts).href, {
+ const url: string =
22
+ (<any>opts).href ||
23
+ `${req.protocol}//${(<any>req).auth || ""}${req.host}${req.path}`;
24
+ const resp = await this.fetchFn(url, {
25
method: opts.method || "GET",
26
body: (<any>opts).body,
27
headers: (opts.headers || {}) as { [key: string]: string },
0 commit comments