Added the node: attribute to the client POST x-www-form-urlencoded example. It’s needed if you are going to use a variable as a value. Ex: Body.data(Node(node: [“code”:code] …..

This commit is contained in:
Arnaldo Capo 2017-02-27 10:08:11 -05:00
parent b5ffdaf8b7
commit e4ad95a6df
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ try drop.client.post("http://some-endpoint/json", headers: ["Content-Type": "app
```swift
try drop.client.post("http://some-endpoint", headers: [
"Content-Type": "application/x-www-form-urlencoded"
], body: Body.data( Node([
], body: Body.data( Node(node: [
"email": "mymail@vapor.codes"
]).formURLEncoded()))
```