stubby4node
stubby4node copied to clipboard
Attribute name with brackets - Error 404
Hi guys, how are you?
I'm trying to do this:
- request:
url: ^/example/path
method: POST
post: next_page=1111&state[]=2&city[]=3
headers:
content-type: application/x-www-form-urlencoded
response:
body: {"status": "success"}
status: 200
But when i do the petition i get a 404.
If i remove the brackets from state
and city
, it works perfectly.
I also try to scape the characters with regexp:
-request:
url: ^/example/path
method: POST
post: next_page=1111&state\[\]=2&city\[\]=3
headers:
content-type: application/x-www-form-urlencoded
response:
body: {"status": "success"}
status: 200
Not working either.
Let me know if there is some workaround or if you are gonna make a release with this. I also see in your docs that you have a TODO about allowing array/maps in query/post: https://www.npmjs.com/package/stubby#todo
Best regards!
Is the client is sending those ~query~ form params with the brackets?
Yes, the client is sending them.