{"action":"opened","issue":{"url":"https://api.github.com/repos/nchaulet/httpbackend/issues/13","labels_url":"https://api.github.com/repos/nchaulet/httpbackend/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/nchaulet/httpbackend/issues/13/comments","events_url":"https://api.github.com/repos/nchaulet/httpbackend/issues/13/events","html_url":"https://github.com/nchaulet/httpbackend/issues/13","id":110645783,"number":13,"title":"returning object while using function callback as respond","user":{"login":"GustavSt","id":5586764,"avatar_url":"https://avatars.githubusercontent.com/u/5586764?v=3","gravatar_id":"","url":"https://api.github.com/users/GustavSt","html_url":"https://github.com/GustavSt","followers_url":"https://api.github.com/users/GustavSt/followers","following_url":"https://api.github.com/users/GustavSt/following{/other_user}","gists_url":"https://api.github.com/users/GustavSt/gists{/gist_id}","starred_url":"https://api.github.com/users/GustavSt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GustavSt/subscriptions","organizations_url":"https://api.github.com/users/GustavSt/orgs","repos_url":"https://api.github.com/users/GustavSt/repos","events_url":"https://api.github.com/users/GustavSt/events{/privacy}","received_events_url":"https://api.github.com/users/GustavSt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-09T12:16:33Z","updated_at":"2015-10-09T12:16:33Z","closed_at":null,"body":"Hello, \r\n\r\nIs there a way to accomplish something like this:\r\n```\r\nfunction setupGet(returnValue){\r\n  httpBackend.whenGET(/someRegex/).respond(function(method, url, data, headers, params){\r\n    //edit returnValue in the callback\r\n    returnValue.url = url; //Error returnValue is undefined\r\n    return [200, returnValue];\r\n  });\r\n}\r\n```\r\nIt works fine when providing just the `returnValue` in the `respond` function, but doing the above doesn't work. I assume since the callback seems to be executed in the browser while `returnValue` is in protractor, so when the function is executed, `returnValue` is not defined. Is there a way to accomplish this?"}}