{"action":"closed","issue":{"url":"https://api.github.com/repos/dingo/api/issues/737","labels_url":"https://api.github.com/repos/dingo/api/issues/737/labels{/name}","comments_url":"https://api.github.com/repos/dingo/api/issues/737/comments","events_url":"https://api.github.com/repos/dingo/api/issues/737/events","html_url":"https://github.com/dingo/api/issues/737","id":118214902,"number":737,"title":"Redirecting to newly created resource using internal API","user":{"login":"michaelstivala","id":4493561,"avatar_url":"https://avatars.githubusercontent.com/u/4493561?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelstivala","html_url":"https://github.com/michaelstivala","followers_url":"https://api.github.com/users/michaelstivala/followers","following_url":"https://api.github.com/users/michaelstivala/following{/other_user}","gists_url":"https://api.github.com/users/michaelstivala/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelstivala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelstivala/subscriptions","organizations_url":"https://api.github.com/users/michaelstivala/orgs","repos_url":"https://api.github.com/users/michaelstivala/repos","events_url":"https://api.github.com/users/michaelstivala/events{/privacy}","received_events_url":"https://api.github.com/users/michaelstivala/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dingo/api/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-21T19:04:21Z","updated_at":"2015-12-02T08:21:32Z","closed_at":"2015-12-02T08:21:32Z","body":"I've got a resource handled by the API, and a separate controller using the internal API:\r\n\r\n```\r\npublic function store(Request $request)\r\n    {\r\n        $this->getAuthenticatedApi()->post('/tags', $request->all());  \r\n    }\r\n```\r\n\r\nThis works fine, my problem is redirecting to the newly created resource - I'm wondering if anyone has dealt with this issue and has a neat solution to it.\r\n\r\nMy API's store method returns a 201 response, with the location header set - I can access this location header if I were to access the \"raw\" response from the api (using the `->raw()` notation). I thought about using the location to access the newly created resource via the internal API, and then use it to redirect as I see fit. The problem here is that the location header links to 'localhost', not my app's URL (separate bug?)\r\n\r\nDoes anyone have any guidance?"}}