Copyright © 2009 Basho Technologies
Authors: Justin Sheehy (justin@basho.com), Andy Gross (andy@basho.com).
boundary() = string()
The multipart boundary, as taken from the containing message's content-type.
fcontent() = binary()
The body content within a form part.
fheader() = {binary(), binary()}
A header name and value supplied within a form part.
fparam() = {binary(), binary()}
A key-value parameter from the content-disposition header in a form part.
fpart() = {fpartname(), {[fparam()], [fheader()]}, fcontent()}
A single part of a multipart form.
fpartname() = string()
The name from the form field of a form part.
find_boundary/1 | Find the multipart boundary for a request. |
get_all_parts/2 | Turn a multipart form into component parts. |
stream_parts/2 | Similar to get_all_parts/2, but for streamed/chunked bodies. |
find_boundary(ReqData::wrq:wm_reqdata()) -> boundary()
Find the multipart boundary for a request.
get_all_parts(Body::incoming_req_body(), Boundary::boundary()) -> [fpart()]
Turn a multipart form into component parts.
stream_parts(StreamStruct::wm_stream(), Boundary::boundary()) -> done_parts | {fpart(), function()}
Similar to get_all_parts/2, but for streamed/chunked bodies. Takes as input the result of wrq:stream_req_body/2, and provides either the atom 'done_parts' when no more parts are available, or a tuple with the next part and a function. That function will have 0-arity and the same return type as stream_parts/2 itself.
Generated by EDoc, Feb 8 2011, 19:14:54.