[Lazarus] Brook-fpWeb POST without fields

silvioprog silvioprog at gmail.com
Thu Mar 20 20:23:36 CET 2014


2014-03-20 16:07 GMT-03:00 Leonardo M. Ramé <l.rame at griensu.com>:
[...]

> Let me clarify this. My app is a CGI program running on an Apache
> server, the client is a javascript file running on the same server.
>
> The relevant part of the client javascript is this:
>
>   blob = new Blob([data.buffer], {type: mimetype});
>   var xhr = new XMLHttpRequest();
>   xhr.open('POST', 'http://127.0.0.1:8080/cgi-bin/test', false);
>   xhr.send(blob);
>
> As you can see, "blob" is an object containing a typed array that I'm
> trying to send to the server using a POST command.


So you need to send it via form-data. Using the form-data you will receive
your buffer in Files property (it points to the "Request.Files" property of
FCL-Web).

--
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/20140320/05e3068b/attachment-0003.html>


More information about the Lazarus mailing list