Skip to content

Attribute name with brackets - Error 404 #81

Description

@Lukeneo12

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!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions