{"action":"closed","issue":{"url":"https://api.github.com/repos/jiangmiao/node-curl/issues/40","labels_url":"https://api.github.com/repos/jiangmiao/node-curl/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/jiangmiao/node-curl/issues/40/comments","events_url":"https://api.github.com/repos/jiangmiao/node-curl/issues/40/events","html_url":"https://github.com/jiangmiao/node-curl/issues/40","id":71744808,"number":40,"title":"Follow Location","user":{"login":"Dev-Dipesh","id":3931017,"avatar_url":"https://avatars.githubusercontent.com/u/3931017?v=3","gravatar_id":"","url":"https://api.github.com/users/Dev-Dipesh","html_url":"https://github.com/Dev-Dipesh","followers_url":"https://api.github.com/users/Dev-Dipesh/followers","following_url":"https://api.github.com/users/Dev-Dipesh/following{/other_user}","gists_url":"https://api.github.com/users/Dev-Dipesh/gists{/gist_id}","starred_url":"https://api.github.com/users/Dev-Dipesh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dev-Dipesh/subscriptions","organizations_url":"https://api.github.com/users/Dev-Dipesh/orgs","repos_url":"https://api.github.com/users/Dev-Dipesh/repos","events_url":"https://api.github.com/users/Dev-Dipesh/events{/privacy}","received_events_url":"https://api.github.com/users/Dev-Dipesh/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-29T00:29:11Z","updated_at":"2015-04-29T00:48:46Z","closed_at":"2015-04-29T00:48:46Z","body":"I want to clone GitHub repo via API using curl, and while requesting git hub it responds back with a redirect location URL as follows:\r\n\r\n```\r\n /repos/:owner/:repo/:archive_format/:ref\r\n```\r\n**EXAMPLE:** https://api.github.com/repos/Dev-Dipesh/docker_mesos.rb/tarball\r\n\r\n```bash\r\nStatus: 302 Found\r\nLocation: https://codeload.github.com/me/myprivate/legacy.zip/master?login=me&token=thistokenexpires\r\nX-RateLimit-Limit: 5000\r\nX-RateLimit-Remaining: 4999\r\n```\r\n\r\nI'm using `CURLOPT_FOLLOWLOCATION` option in code for achieving this:\r\n```javascript\r\ncurl(\r\n\t  \t'https://api.github.com/repos/Dev-Dipesh/docker_mesos.rb/tarball', \r\n\t  \t{CURLOPT_FOLLOWLOCATION: 1}, \r\n\t  \tfunction(err) {\r\n\t\t    logger.info(this.status);\r\n\t\t    logger.info('-----');\r\n\t\t    logger.info(this.body);\r\n\t\t    logger.info('-----');\r\n\t\t    logger.info(this.info('SIZE_DOWNLOAD'));\r\n\t  });\r\n```\r\n\r\nbut it returns: \r\n```\r\nError: unsupported option CURLOPT_FOLLOWLOCATION\r\n```\r\n\r\nSo, do node-curl support this option or is there any other way for achieving this?"}}