arduino-libraries / ArduinoHttpClient

Arduino HTTP Client library
287 stars 172 forks source link

docs unclear on how to basis auth #135

Open geetee24 opened 2 years ago

geetee24 commented 2 years ago

My code http.connectionKeepAlive(); http.beginRequest(); *piRetCode = http.get( strPath ); http.sendBasicAuth ( "user", "pw" ); http.sendHeader( HTTP_HEADER_CONNECTION, "keep-alive" ); http.sendHeader( "Cache-Control", "max-age=0" ); http.sendHeader( "Accept", "application/json" ); http.endRequest();

but my server responds with a timeout 401....

is my code correct?