EDIT:
After a while of "try and error" I discovered that only the password field matters. The header is only set to the base64 hash of the "password" inside the "auth" section. The "login" is completly ignored...
Initial Toughts
If I set:
Code: Select all
auth: {
login: "xyz",
password: ""
},
Code: Select all
POST / HTTP/1.1
User-Agent: XMLHttpRequest
Host: localhost:11122
Accept: */*
Content-Length: 41
Content-Type: application/x-www-form-urlencoded
type=note&title=Motion detected&body=Test
Code: Select all
POST / HTTP/1.1
Authorization: Basic eHl6Og==
User-Agent: XMLHttpRequest
Host: localhost:11122
Accept: */*
Content-Length: 41
Content-Type: application/x-www-form-urlencoded
type=note&title=Motion detected&body=Test
Code: Select all
headers : {
"Authorization" : "Basic <base64string>"
},
Code: Select all
POST / HTTP/1.1
User-Agent: XMLHttpRequest
Host: localhost:11122
Accept: */*
Authorization: Basic%20<base64string>
Content-Length: 41
Content-Type: application/x-www-form-urlencoded
type=note&title=Motion detected&body=Test