{"action":"created","issue":{"url":"https://api.github.com/repos/dingo/api/issues/548","labels_url":"https://api.github.com/repos/dingo/api/issues/548/labels{/name}","comments_url":"https://api.github.com/repos/dingo/api/issues/548/comments","events_url":"https://api.github.com/repos/dingo/api/issues/548/events","html_url":"https://github.com/dingo/api/issues/548","id":98147381,"number":548,"title":"Internal request doesn't send data","user":{"login":"mentos1386","id":1910649,"avatar_url":"https://avatars.githubusercontent.com/u/1910649?v=3","gravatar_id":"","url":"https://api.github.com/users/mentos1386","html_url":"https://github.com/mentos1386","followers_url":"https://api.github.com/users/mentos1386/followers","following_url":"https://api.github.com/users/mentos1386/following{/other_user}","gists_url":"https://api.github.com/users/mentos1386/gists{/gist_id}","starred_url":"https://api.github.com/users/mentos1386/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mentos1386/subscriptions","organizations_url":"https://api.github.com/users/mentos1386/orgs","repos_url":"https://api.github.com/users/mentos1386/repos","events_url":"https://api.github.com/users/mentos1386/events{/privacy}","received_events_url":"https://api.github.com/users/mentos1386/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":20,"created_at":"2015-07-30T11:42:06Z","updated_at":"2015-08-04T11:45:20Z","closed_at":null,"body":"I am sending POST data (username and password) to ```/proxy``` where i add some more data to array and make Internal request to ```/oauth/access_token``` with new array. \r\n```php\r\n$request = app('request')->only('username', 'password');\r\n\r\n$credentials = [\r\n    'grant_type'    => 'password',\r\n    'username'      => $request['username'],\r\n    'password'      => $request['password'],\r\n    'client_id'     => env('OAUTH_CLIENT_ID'),\r\n    'client_secret' => env('OAUTH_CLIENT_SECRET')\r\n];\r\n\r\ntry{\r\n    $response = $dispatcher->post('oauth/access_token', $credentials);\r\n}catch (InternalHttpException $e)\r\n{\r\n    return response()->json($e->getResponse()->original);\r\n}\r\n```\r\n\r\nBut the problem is that data ```/oauth/access_token``` gets is only username and password from request to ```/proxy```, and not new array.\r\n```\r\n  +request: ParameterBag {#130\r\n    #parameters: array:2 [\r\n      \"username\" => \"Username\"\r\n      \"password\" => \"Password\"\r\n    ]\r\n```\r\n\r\nWhat  did I do wrong?"},"comment":{"url":"https://api.github.com/repos/dingo/api/issues/comments/127574689","html_url":"https://github.com/dingo/api/issues/548#issuecomment-127574689","issue_url":"https://api.github.com/repos/dingo/api/issues/548","id":127574689,"user":{"login":"mentos1386","id":1910649,"avatar_url":"https://avatars.githubusercontent.com/u/1910649?v=3","gravatar_id":"","url":"https://api.github.com/users/mentos1386","html_url":"https://github.com/mentos1386","followers_url":"https://api.github.com/users/mentos1386/followers","following_url":"https://api.github.com/users/mentos1386/following{/other_user}","gists_url":"https://api.github.com/users/mentos1386/gists{/gist_id}","starred_url":"https://api.github.com/users/mentos1386/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mentos1386/subscriptions","organizations_url":"https://api.github.com/users/mentos1386/orgs","repos_url":"https://api.github.com/users/mentos1386/repos","events_url":"https://api.github.com/users/mentos1386/events{/privacy}","received_events_url":"https://api.github.com/users/mentos1386/received_events","type":"User","site_admin":false},"created_at":"2015-08-04T11:45:20Z","updated_at":"2015-08-04T11:45:20Z","body":"``` setRequest() ```\r\n\r\nReturns\r\n\r\n```\r\n  +request: ParameterBag {#147\r\n    #parameters: array:2 [\r\n      \"username\" => \"Username\"\r\n      \"password\" => \"Password\"\r\n    ]\r\n  }\r\n```\r\nAnd ``` getRequest()```\r\nreturns:\r\n```\r\n  +request: ParameterBag {#147\r\n    #parameters: array:2 [\r\n      \"username\" => \"Username\"\r\n      \"password\" => \"Password\"\r\n    ]\r\n```\r\n\r\nBoth of them are instance of  ```Dingo\\Api\\Http\\Request```\r\n\r\nEven ``` app('request') ```\r\n```php\r\n    public function setRequest($request)\r\n    {\r\n        $this->request = app('request');\r\n\r\n        dd($this->request);\r\n        return $this;\r\n    }\r\n```\r\n\r\nthat worked on bar->foo  route, doesn’t work here.\r\n\r\nBut weirdly, this works\r\n```php\r\n    public function getRequest()\r\n    {\r\n        if ($this->request === null) {\r\n            $this->request = Request::createFromGlobals();\r\n        }\r\n\r\n        return app('request');\r\n    }\r\n```\r\n```\r\n  +request: ParameterBag {#195\r\n    #parameters: array:5 [\r\n      \"grant_type\" => \"password\"\r\n      \"username\" => \"Username\"\r\n      \"password\" => \"Password\"\r\n      \"client_id\" => \"1\"\r\n      \"client_secret\" => \"secret\"\r\n    ]\r\n  }\r\n```"}}