{"action":"opened","issue":{"url":"https://api.github.com/repos/restify/node-restify/issues/1033","repository_url":"https://api.github.com/repos/restify/node-restify","labels_url":"https://api.github.com/repos/restify/node-restify/issues/1033/labels{/name}","comments_url":"https://api.github.com/repos/restify/node-restify/issues/1033/comments","events_url":"https://api.github.com/repos/restify/node-restify/issues/1033/events","html_url":"https://github.com/restify/node-restify/issues/1033","id":141847278,"number":1033,"title":"cross  domain","user":{"login":"Suhsmitha19","id":17899796,"avatar_url":"https://avatars.githubusercontent.com/u/17899796?v=3","gravatar_id":"","url":"https://api.github.com/users/Suhsmitha19","html_url":"https://github.com/Suhsmitha19","followers_url":"https://api.github.com/users/Suhsmitha19/followers","following_url":"https://api.github.com/users/Suhsmitha19/following{/other_user}","gists_url":"https://api.github.com/users/Suhsmitha19/gists{/gist_id}","starred_url":"https://api.github.com/users/Suhsmitha19/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Suhsmitha19/subscriptions","organizations_url":"https://api.github.com/users/Suhsmitha19/orgs","repos_url":"https://api.github.com/users/Suhsmitha19/repos","events_url":"https://api.github.com/users/Suhsmitha19/events{/privacy}","received_events_url":"https://api.github.com/users/Suhsmitha19/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-18T11:59:46Z","updated_at":"2016-03-18T11:59:46Z","closed_at":null,"body":"How to make a cross domain call in get function?\r\n\r\nMy server script is:\r\n\r\nserver.get(\"/lookup\", function(req, res, next) {\r\n      console.log(\"in lookup\");\r\n      res.header(\"Access-Control-Allow-Origin: *\");\r\n      res.header('Access-Control-Allow-Methods: GET, POST, OPTIONS');\r\n      res.header(\"Access-Control-Allow-Headers\", \"X-Requested-With\");\r\n      res.send(\"RESPONSE);\r\n}\r\n\r\nMy client side is:\r\nxmlhttp.onreadystatechange = function(resp) {\r\n    console.log(\"in resp\");\r\n    console.log(xmlhttp.responseText);\r\n}\r\n   \r\n  xmlhttp.open(\"GET\", url, true);\r\n  xmlhttp.setRequestHeader(\"Access-Control-Allow-Origin\", \"*\");\r\n  xmlhttp.send();\r\n  });\r\n\r\nMy status i s0 and I have no response text. Can you help me sort this?"}}