B4R Question ESP8266 basic authorization?

peacemaker

Expert
Licensed User
Longtime User
HI, All

Possible HTTP downloading file with login\password ?
 

hatzisn

Well-Known Member
Licensed User
Longtime User
Why don't you add username and password encrypted as headers and handle the headers in the receiving part?
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
Hmm, indeed, no problem to do as both sides can. So, question is how server side can
 
Upvote 0

hatzisn

Well-Known Member
Licensed User
Longtime User
For server side which language do you use?
 
Upvote 0

hatzisn

Well-Known Member
Licensed User
Longtime User
You can make a request like https://www.mysite.com/app?fileid=1 with the prementioned headers. On server side validate credentials and identify the file by the fileid (or whatever you use). Set the response type to application/content-stream read the file and write its bytes to the response.
 
Upvote 0

hatzisn

Well-Known Member
Licensed User
Longtime User
*type=content type
 
Upvote 0

hatzisn

Well-Known Member
Licensed User
Longtime User
*content-stream=octet-stream
 
Upvote 0
Top