Skip to content

How to proxy request and response? #148

Answered by gavv
debugtalk asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, sorry for late reply.

You can provide a custom http client using Config.Client field. When constructing a client, I guess you can set Client.Transport.Proxy to a desired proxy.

Also, if you set Config.Client to a http.Client with DefaultTransport, I think it should also respect HTTP_PROXY variable.

I didn't test it though. It would be nice to add a test and an example for using proxy with httpexpect. I'll assign help wanted tag to this issue, so someone may add them.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by gavv
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #148 on November 14, 2022 10:42.