On 27. 10. 2022. 19:03, duilio foschi via lazarus wrote:
I tried to run demorestbridge inside Lazarus in debug mode.
When the web browser points to
http://localhost:3000/REST/metadata
the debugger shows an error message that says:
'project SQLDB REST bridge raised an exception of class 'EHTTP' with
message: No REQUEST_METHOD passed from server.. At address 10009D512'
Any idea what this could mean?
Yes, browsers by default do not send requested params (eg. request
method). Use curl to test your server.
eg
curl -u YOURUSERNAME:PASSWORD -H "Content-Type: application/json"
"http://localhost:3000/REST/metadata"
curl by default set request method to GET.
curl -u YOURUSERNAME:PASSWORD -H "Content-Type: application/json" -X
GET "http://localhost:3000/REST/metadata"
If this results in error 400-40xx then you must include connection after
REST eg http://localhost:3000/REST/YOURDEFAULTCONNECTIONNAME/metadata
zeljko
--
_______________________________________________
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus