0
Sending Username and Password with Ajax
I am working on a control for Axis cameras, this cameras have something called Guard Mode. That we need to enable or disable, depending the situation. Anyways to do that I have to pass the username and password with a get command. I looked and many examples online and can get it to work. Dows anybody knows a right way of doing it? Thanks
1 Réponse
+ 3
As far as I know passing data with ajax you use post and not get. You have several options to choose from:
1. The raw XMLHTTPRequest
2. Axios library ajax wrapper built on promise API
3. Fetch api
4. jQuery library ajax syntax
For how to use raw XMLHttpRequest you could check this to have little insight:
https://code.sololearn.com/Wha5SfG0UO1w/?ref=app
Or you could look up on how to use the above options from Google or Mozilla Developer Network(https://developer.mozilla.org/en-US/)