# How to use getParam () in version 4

**URL:** <https://discourse.slimframework.com/t/how-to-use-getparam-in-version-4/3655>\
**Category:** Questions\
**Created:** [November 16, 2019, 9:20pm UTC](https://discourse.slimframework.com/t/how-to-use-getparam-in-version-4/3655 "2019-11-16T21:20:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![masebas921120](https://avatars.discourse-cdn.com/v4/letter/m/dbc845/32.png) [@masebas921120](https://discourse.slimframework.com/u/masebas921120)\
**Post date:** [November 16, 2019, 9:20pm UTC](https://discourse.slimframework.com/t/how-to-use-getparam-in-version-4/3655/1 "2019-11-16T21:20:50Z")

</div>

Good afternoon community, I would like to know in version 4.0 of the framwork how I retrieve the request parameters. in version 3 getParam = request-\> getParam (‘nameParam’) was used, but I have not been able to identify how it is used in version 4. I greatly appreciate what you can support me.

Happy day

---

<div class="post-metadata">

**Author:** ![odan](https://avatars.discourse-cdn.com/v4/letter/o/9de053/32.png) [@odan](https://discourse.slimframework.com/u/odan)\
**Post date:** [November 17, 2019, 3:02pm UTC](https://discourse.slimframework.com/t/how-to-use-getparam-in-version-4/3655/2 "2019-11-17T15:02:44Z")

</div>

Hi @masebas921120

You should find this information it in the [Slim 4 documentation](http://www.slimframework.com/docs/v4/objects/request.html).

Option 1: Use the PSR-7 request object, e.g. `$request->getQueryParams()` or `$request->getParsedBody()`  
Option 2: Use the PSR-7 compatible request object [slim/http](https://github.com/slimphp/Slim-Http#serverrequestgetparsedbodyparamkey-default), e.g. `$request->getParam('my-param')` or `$request->getParsedBodyParam('key')`

---

<div class="post-metadata">

**Author:** ![masebas921120](https://avatars.discourse-cdn.com/v4/letter/m/dbc845/32.png) [@masebas921120](https://discourse.slimframework.com/u/masebas921120)\
**Post date:** [November 19, 2019, 2:07pm UTC](https://discourse.slimframework.com/t/how-to-use-getparam-in-version-4/3655/3 "2019-11-19T14:07:40Z")

</div>

Regards,

Thank you very much for the information, we proceed to perform the tests.

have a happy day
