[Lazarus] TFPHTTPServer and POST method with JSON content

JB josebenedito at gmail.com
Fri May 23 01:29:55 CEST 2014


Hi guys,

I'm trying to implement a simple server that responds to calls JSON (JSON
RPC). I'm using this tutorial
http://www.freepascal.org/~michael/articles/webserver1/webserver1.pdf

Works well, but does not recognize POST methods sent as JSON, only
recognizes when sending HTTP forms.

When I try to send a JSON call, the server receives an OPTION method.

In lazarus projects wizards and brook framework wizards work fine, with the
actions and same JSON call.

I use ajax with json dataType and contentType application/json.

I need charge contents types on server? I need to implement something more?
What could be wrong?

Thanks

Best regards

José Benedito
JBS Soluções
Consulting Systems Development
c <josebenedito at gmail.com>ontato at jbsolucoes.net
www.jbsolucoes.net

skype: sac at jbsolucoes.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20140522/3a20e8ce/attachment-0002.html>


More information about the Lazarus mailing list