Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attribute name with brackets - Error 404 #81

Open
Lukeneo12 opened this issue Jan 21, 2020 · 2 comments
Open

Attribute name with brackets - Error 404 #81

Lukeneo12 opened this issue Jan 21, 2020 · 2 comments

Comments

@Lukeneo12
Copy link

Lukeneo12 commented Jan 21, 2020

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!

@mrak
Copy link
Owner

mrak commented Jan 21, 2020

Is the client is sending those query form params with the brackets?

@Lukeneo12
Copy link
Author

Yes, the client is sending them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants