Equivalent of `HttpProxyAgent` in Effect for HTTP Requests

what the equivalent of HttpProxyAgent in Effect?

I tried rewriting the following code in Effect so I wanna know if there is sth. for adding proxy to the request pipeline
import fetch from "node-fetch";
import { HttpsProxyAgent } from "https-proxy-agent";

const proxyUrl = "http://proxy-server:8080";
const agent = new HttpsProxyAgent(proxyUrl);

const targetUrl = "https://api.example.com/resource";

fetch(targetUrl, {
  method: "GET",
  agent, 
  headers: {
    "Authorization": "Bearer token",
    "Content-Type": "application/json",
  },
})


 yield* HttpClientRequest.get(targetUrl).pipe(
      HttpClientRequest.setHeaders(headers),
      httpClient.execute,
      Effect.andThen(HttpClientResponse.schemaBodyJson(MySchema)),
    );
Was this page helpful?