Created
August 20, 2015 20:10
-
-
Save etjossem/d53184c85a8ef1710974 to your computer and use it in GitHub Desktop.
Modification to ImportJSON
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 ImportJSONBasicAuthentication(url, query, parseOptions, username, password) { | |
var fetchOptions = { | |
"headers" : { | |
"Authorization" : 'Basic ' + Utilities.base64Encode(username + ':' + password) | |
}, | |
muteHttpExceptions: true | |
}; | |
return ImportJSONAdvanced(url, fetchOptions, query, parseOptions, includeXPath_, defaultTransform_); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment