# Slim v3 PUT method and retrieve POST data

**URL:** <https://discourse.slimframework.com/t/slim-v3-put-method-and-retrieve-post-data/849>\
**Category:** Questions\
**Created:** [October 26, 2016, 7:45pm UTC](https://discourse.slimframework.com/t/slim-v3-put-method-and-retrieve-post-data/849 "2016-10-26T19:45:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AdamR](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@AdamR](https://discourse.slimframework.com/u/AdamR)\
**Post date:** [October 26, 2016, 7:45pm UTC](https://discourse.slimframework.com/t/slim-v3-put-method-and-retrieve-post-data/849/1 "2016-10-26T19:45:43Z")

</div>

I have added route to update emails in a database which uses PUT method

`$app->put('/notifications/{email}', 'add_email_address');`

and function for it looks like:

```
function add_email_address($request, $response, $args) {

  $email = $args['email'];
      $addon_email = $request->getParam('addon_email', null);

      echo "ADD/UPDATE $email with $addon_email";

}

```

somehow on testing PUT method with a form input post addon\_email = [test@null.com](mailto:test@null.com) retrieved value for `$addon_email` is empty

Any tips what I’m doing wrong?

---

<div class="post-metadata">

**Author:** ![AdamR](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@AdamR](https://discourse.slimframework.com/u/AdamR)\
**Post date:** [October 28, 2016, 4:55pm UTC](https://discourse.slimframework.com/t/slim-v3-put-method-and-retrieve-post-data/849/2 "2016-10-28T16:55:11Z")

</div>

I have got it to work by changing

`$addon_email = $app->request->getParam('addon_email', null);`

to

```
$allPostPutVars = $request->getParsedBody();
$addon_email = $allPostPutVars['addon_email'];

```

It looks like getParam works only for GET method. Also content-type must be set as x-www-form-urlencoded
