I am working with example restbridgeclient (pasjs demo) and restserver (Lazarus demo) from sqldbrest.
When using jsonclient (Lazarus demo) it works OK and the server shows:
[Resource] (User: ?) Resource: metadata; Operation: GET
[Connection] (User: ?) Using connection to Host: localhost; Database: expensetracker
[Authentication] (User: me) Authenticated user: me
[Result] (User: me) Resource: metadata; Operation: GET; Status: 200; Text: OK
However, when using restbridgeclient example (pasjs demo), it doesn't work and the server shows:
[Result] (User: ?) Resource: metadata; Operation: OPTIONS; Status: 403; Text: FORBIDDEN
The difference is in the Operation, it should be 'GET', but it sends 'OPTIONS'.
In the unit sqldbrestdataset, there is the "constructor TServiceRequest.Create", if I comment the following line of code
FXHR.setRequestHeader('Authorization', 'Basic '+window.btoa(aUserName+':'+aPassword));
it sends the 'GET' method, but obviously it would not be authenticated and still does not work.
Please can you help me solve it?
Thank you