[Lazarus] [Brook] HTTP method not allowed for the requested resource
silvioprog
silvioprog at gmail.com
Fri Feb 28 15:43:15 CET 2014
2014-02-27 4:53 GMT-03:00 Giuseppe <glpunzi at gmail.com>:
[...]
> /////
> Open \brookframework\demos\simple\entity project
> Build.
> Copy to cg1.bf to cgi-bin folder
> http://localhost:8080/cgi-bin/cgi1.bf returns "HTTP method not allowed
> for the requested resource."
> Didn't worked (with BrookFCLCGIBroker, either with BrookFCLHttpAppBroker)
>
Well, see:
TMyAction = class(specialize TBrookEntityAction<TMyType>)
public
procedure Post; override; <<<<<< POST
end;
ie, you can't open it directly in the URL of Chrome (GET), you need to call
it via POST method (using rest client).
> //////
> Created postgres database with table person.
> Open brookframework/demos/db/dopf/cgi1.lpi
> Changed db configuration from dbutils.pas pointing to my database
> Copied all postgres dll from postgres/bin folder to project folder.
> http://localhost returns "HTTP method not allowed for the requested
> resource."
>
Oh, you can't open it directly in the URL of Chrome too calling only
localhost. Compile your project using CGI broker, copy your executable to
the cgi-bin folder, copy "form.html" to the htdocs folder, after, call: "
http://localhost/form.html". Using this form it will do a request using
POST method.
--
Silvio Clécio
My public projects - github.com/silvioprog
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20140228/128a136b/attachment-0003.html>
More information about the Lazarus
mailing list