Hi, I wanted to use response templating for formDa...
# general
j
Hi, I wanted to use response templating for formData but couldn't figure it out. I get a request with something like
Copy code
Content-Type: multipart/form-data; boundary=---------------------------974767299852498929531610575

-----------------------------974767299852498929531610575
Content-Disposition: form-data; name="username"

JohnDoe
-----------------------------974767299852498929531610575
Content-Disposition: form-data; name="password"

secret123
and would like to include the "JohnDoe" in the response. The documentation mentions a way of accessing formData:
Copy code
{{formData request.body 'form' urlDecode=true}}{{{form.formField3}}
but I don't know what to set the parameters to. Is this supported?
1
t
The
formData
helper is just for URL encoded form data (k=v& style), not multipart at the moment. Unfortunately this means you’re limited to regexes as a way of extracting multiparts.
j
Alright, thanks for clarifying. I'll use a ResponseTransformer then, that's probably easier in our use case
👍 1