Closed dephiros closed 8 months ago
Ah i see that the doc intend this method for x-www-form-urlencoded
Does the lib support Content-Type: multipart/form-data;
?
It doesn't. It's something I can look into adding though.
The multiform_part branch has a new method: req.multiFormData()
. It's a different method then req.formData()
because the "value" is a struct, not just a []const u8
const fd = try req.multiFormData();
const name = fd.get("name").?.value;
Currently the struct only exposes a .value: []const u8
, but I'll be adding filename: ?[]const u8
and maybe content_type: []const u8
(since apparently each field can have its own content type)
You need to set the request.max_multiform_count
to the maximum number of fields you want to accept, it defaults to 0.
If you run into any issues parsing the data, please provide the full request or at least an HTML form to replicate it. Parsing this was messy than I had initially thought!.
Thank you. Appreciate your work 🙏
Hi thank you for your lib
Problem
Given this request
header:
body:
When I follow the instruction in the doc and do:
I got key:
and value:
Maybe the parser does not support form/data boundary?