lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



On Nov 09, 2007, at 16:42, Mariano Kamp wrote:

how would one encode form data using "multipart/form-data"? I am looking for a library.

FWIW, here is a module to parse MIME structures...

http://dev.alt.textdrive.com/browser/HTTP/MIME.lua

Usage example:

local MIME = require( 'MIME' )
local aMIME = MIME( aContent )

print( aMIME.type )

for anIndex, aValue in ipairs( aMIME.content ) do
    print( aValue.key, aValue.value )
end