tatethurston / TwirpScript

A protobuf RPC framework for JavaScript and TypeScript
MIT License
141 stars 14 forks source link

Sending requests through a proxy #186

Closed jwlee-asp closed 2 years ago

jwlee-asp commented 2 years ago

I have used http libraries with hpagent to send requests to a proxy. Is it possible to send requests made from the client through a proxy? I couldn't find a configuration with the client, but would there be an avenue using the middleware?

tatethurston commented 2 years ago

Hey @jwlee-asp thanks for opening this. I had thought that I had documented rpcTransport but it appears I haven't.

I believe something like this would work, replacing fetch with your instance of hpagent. LMK if that works, or if you run into any issues.