-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Add support for http proxy to esp8266 http client #8094
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
base: master
Are you sure you want to change the base?
Conversation
@@ -177,6 +177,7 @@ class HTTPClient | |||
void setAuthorization(const char * user, const char * password); | |||
void setAuthorization(const char * auth); | |||
void setTimeout(uint16_t timeout); | |||
bool setProxyHost(const String &proxyUrl); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sample usage
WiFiClient client;
HTTPClient http;
http.setProxyHost("http://192.168.1.1:8080");
http.begin(client, "http://foo.bar/");
// If the proxy requires auth
http.addHeader("Proxy-Authorization", "Basic aaaaaaaaaaaa=");
http.GET();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about putting a line in the documentation, or adding an example ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, can you point me to where those are located?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's the HTTPClient examples location.
As you can see, the file hierarchy is myExampleName/myExampleName.ino
.
Documentation is ...
... there's absolutely no official documentation on HTTPClient
.
So your addition will be added in the documentation when it will be written for the whole class, or if we add doxygen at some point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your time on this factorisation effort !
Little changes, the most important are the debug lines that were mistakingly added I believe
Thanks for all your updates ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your patience !
@ChrisSmith Do you think you can solve the conflict, or do you need help ? |
Hey @d-a-v I don't have time to resolve the conflict and test at the moment. You should be able to resolve + commit to this branch if you'd like. Otherwise I'll get to it when I am free |
Fixes #8085
I was able to verify this works with my proxy setup, it would be good for others to test as well, I'm no expert on how proxies are configured.
I do very little c++ so don't be afraid to give me lots of feedback :)