-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
发送给代理服务器的HTTP请求行的格式该如何写? #999
Comments
你好。发给代理的时候,Host要填写最终目标的: |
非常感谢! |
啊,这个具体看Postman怎么用了。我也没有用过。 |
那如果单纯从写程序的角度上来说,我想通过代理服务器获取资源,在create_http_task(const std::string& url,int redirect_max,int retry_max,http_callback_t callback)这一步,发送给代理服务器的url应该怎么写啊。。。 |
哦,我想到了,有一个有代理服务器url的接口。。。 |
非常感谢! |
这个也有,在我们的FAQ里,关于使用http proxy的那一条,其中的方法1。 |
好的好的 |
我还有点小问题 |
1、可以用retry_max。但retry_max包括了connect,send,read等一切的错误。 |
好的谢哥 |
作者好!
我学习了一下tutorial-05-http_proxy.md中代理服务器的相关内容。
设定监听端口号为1234,运行这个例子后,我在浏览器中设置好代理服务器地址后可以得到正确的结果。
我想自己用Postman模拟一下浏览器发送报文到代理服务器的过程,但是无法成功,想请教一下应该如何设置请求参数。
以下是我设置的postman格式:
Get http://www.sogou.com/ HTTP/1.1
Host:127.0.0.1:1234
User-Agent:Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8
Accept-Language:en-US,en;q=0.5
Accept-Encoding:gzip, deflate
Connection:keep-alive
还请指正
The text was updated successfully, but these errors were encountered: