I need to do a GET request in the form: user:passw@ip:port/streaming/channels/1/picture to capture a still frame from an Ip camera. Is there a way to do this with the ESP8266HTTPClient.h library?

The samples show a GET request as: http.begin(host,port,url);
What I need to do is get the user:passw@ put in before the host:url

  • You can rewrite your question as a more generic problem (file downloading, password, ports). That way more people will find it. – user31481 Feb 21 '18 at 10:39

use the http.setAuthorization(user, passw) method.


It would depend whether it's digest or basic authentication. If former, you have a nice example here: https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266HTTPClient/examples/DigestAuthorization/DigestAuthorization.ino

and if it's the latter, you can just do something like this: http.begin("http://user:password@example.com/test.html");

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.