[luci] What about luasrc/httpclient.lua?
Bryan Mayland
bmayland at leoninedev.com
Wed Feb 13 22:23:09 CET 2013
On 2/13/2013 4:12 PM, Jan Lühr wrote:
> Thanks for your reply. However, I'm still stucked at constructing the body. As far as I got, request_raw does not provide any routines for building multipart/form-data chunks. If I supply all data in a table, it'll be url-encoded (which is bad for larger binary files).
>
> Are you aware of any higher-level routines using request_raw(.)? Constructing HTTP-Request bodies by hand seem to be rather error-prone (imho) - actually, that's why I'm looking for a http-client library.
>
You can have a look at what the Fonera people do with their "uploadd"
library, which is a file uploader (to facebook, youtube, picasa, etc)
that uses httpclient. You can specify that your content encoding is
binary for the mime chunk and then use a callback function to just
stream the data from file to the HTTP connection.
http://svn.fonosfera.org/fon-ng/trunk/luci/libs/uploadd/luasrc/fon/
More information about the luci
mailing list