Created
January 14, 2016 08:03
-
-
Save jjhesk/031628408f10c94697d5 to your computer and use it in GitHub Desktop.
this google app script is to build the redirection pie Uri
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function httpredirectpie(url) { | |
var options = { | |
headers:{ | |
"Accept":"application/json", | |
"X-Api-version":"2.0" | |
}, | |
muteHttpExceptions: true, | |
followRedirects: false | |
}; | |
var responose = UrlFetchApp.fetch(url, options); | |
var stored = responose.getHeaders(); | |
Logger.log(stored.toSource()); | |
return stored['Location']; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment