# Getting Method not allowed Message While Using Post Method in Routes

**URL:** <https://discourse.slimframework.com/t/getting-method-not-allowed-message-while-using-post-method-in-routes/1601>\
**Category:** Questions\
**Created:** [June 21, 2017, 7:13pm UTC](https://discourse.slimframework.com/t/getting-method-not-allowed-message-while-using-post-method-in-routes/1601 "2017-06-21T19:13:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![trainerplus](https://avatars.discourse-cdn.com/v4/letter/t/9de0a6/32.png) [@trainerplus](https://discourse.slimframework.com/u/trainerplus)\
**Post date:** [June 21, 2017, 7:13pm UTC](https://discourse.slimframework.com/t/getting-method-not-allowed-message-while-using-post-method-in-routes/1601/1 "2017-06-21T19:13:27Z")

</div>

Hello Guys,

It is the first time I am using PHP Slim Framework. I am having a trouble with the framework. The problem of mine is the following.

```
$app->post('/address/{id}/{name}', function ($request, $response, $args) {
echo $args['id'];
echo $args['name'];
$response->isPost();
});

```

While accessing the page. public/address/123/muhsin - I am ggeting the error  
Method not allowed

---

<div class="post-metadata">

**Author:** ![SVL](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@SVL](https://discourse.slimframework.com/u/SVL)\
**Post date:** [June 21, 2017, 7:52pm UTC](https://discourse.slimframework.com/t/getting-method-not-allowed-message-while-using-post-method-in-routes/1601/2 "2017-06-21T19:52:55Z")

</div>

$app-\>post only accepts POST methods.  
Read more about routes here:  
[https://www.slimframework.com/docs/objects/router.html](https://www.slimframework.com/docs/objects/router.html)
