Using http with username/password from mongoose-os (esp32)

#1

If you are asking a question, please follow this template:

  1. My goal is: to configure the ESP32 to collect / configure a device that is accessible via http with username & password authentication.
  2. My actions are: I have tried: 1) loading api_http.js but unsure how to add the username and password 2) Using a node.js package called request.js but am not sure how to load it
  3. The result I see is:
  4. My expectation & question is: Does anyone have sample code I can use to allow me to connect to an http site allowing me to specify the username and password in the code?
#2

Adding more content based on attempts to get this working…

I tried the following:
HTTP.query({
url: ‘http://rest-of-url’, username: ‘username’, pass: ‘password’,
success: function(body, full_http_msg) { print(body); },
error: function(err) { print(err); } // Optional
});

and am getting this error message in the attached image.

It’s looking for Digest authentication. Do you have guidance on how to change from Basic to Digest and what syntax I need to use? Alternatively, any way to get this to work with Basic authentication?

Thanks!
Dan