Skip to content
This repository has been archived by the owner on Apr 20, 2021. It is now read-only.

[RestContext] Arrays in request #264

Open
Mateuszry opened this issue Oct 1, 2018 · 0 comments
Open

[RestContext] Arrays in request #264

Mateuszry opened this issue Oct 1, 2018 · 0 comments

Comments

@Mateuszry
Copy link

After release v3.2.0 with feature: "Allows parameters with dot" #258 arrays in request didn't work as before.
Feature:

And I send a "POST" request to "/api/supplier" with parameters:
      | key         | value               |
      | name        | testName            |
      | user[email] | testEmail@email.com |
      | user[lang]  | en                  |

Request dump in Symfony application before release:

array(2) {
  ["name"]=>
  string(8) "testName"
  ["user"]=>
  array(2) {
    ["email"]=>
    string(19) "testEmail@email.com"
    ["lang"]=>
    string(2) "en"
  }
}

Request dump in Symfony application after release:

array(3) {
  ["name"]=>
  string(8) "testName"
  ["user[email]"]=>
  string(19) "testEmail@email.com"
  ["user[lang]"]=>
  string(2) "en"
}

I also tried the syntax with dots:
Feature:

    And I send a "POST" request to "/api/supplier" with parameters:
      | key         | value               |
      | name        | testName            |
      | user.email  | testEmail@email.com |
      | user.lang   | en                  |

Request dump in Symfony application:

array(3) {
  ["name"]=>
  string(8) "testName"
  ["user.email"]=>
  string(19) "testEmail@email.com"
  ["user.lang"]=>
  string(2) "en"
}
@Mateuszry Mateuszry changed the title RestContext [RestContext] Arrays in request Oct 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant