# Cannot update request in Slim container

**URL:** <https://discourse.slimframework.com/t/cannot-update-request-in-slim-container/1476>\
**Category:** Questions\
**Created:** [May 8, 2017, 8:02am UTC](https://discourse.slimframework.com/t/cannot-update-request-in-slim-container/1476 "2017-05-08T08:02:48Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![vee](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/vee/32/163_2.png) [@vee](https://discourse.slimframework.com/u/vee)\
**Post date:** [May 8, 2017, 12:52pm UTC](https://discourse.slimframework.com/t/cannot-update-request-in-slim-container/1476/3 "2017-05-08T12:52:00Z")

</div>

I use…

```
// update uri to request.
$uri = $uri->withPath($new_path);
$request = $request->withUri($uri);
// remove and then set new "request".
$this->CI->offsetUnset('request');
$this->CI->offsetSet('request', $request);

```

Add after this topic [How to apply new $\_SERVER['REQUEST\_URI'] to Slim?](http://discourse.slimframework.com/t/how-to-apply-new--server-request-uri-to-slim/1423)

---

_[View the full topic](https://discourse.slimframework.com/t/cannot-update-request-in-slim-container/1476)._
