[Lazarus] testing demorestbridge without a web server: is that possible?
zeljko
zeljko at holobit.hr
Thu Oct 27 19:13:54 CEST 2022
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
More information about the lazarus
mailing list