get apiUrl() { const { tree, jobUrl } = this; const query = tree ? `?tree=${qs.escape(tree)}` : ''; return `${jobUrl}api/json${query}`; }
getFilePublicLink(fileName) { return `https://firebasestorage.googleapis.com/v0/b/${this.bucketName}/o/${querystring.escape(fileName)}?alt=media`; }
async function listBuilds(cli, request, type) { // assert(type === COMMIT || type === PR) const { jobName } = CI_TYPES.get(type); const tree = 'builds[url,result]'; const url = `https://${CI_DOMAIN}/job/${jobName}/api/json?tree=${qs.escape(tree)}`; cli.startSpinner(`Querying ${url}`); const result = await request.json(url); const builds = result.builds; const failed = filterBuild(builds, statusType.FAILURE); const aborted = filterBuild(builds, statusType.ABORTED); const pending = filterBuild(builds, null); const unstable = filterBuild(builds, statusType.UNSTABLE); const success = filterBuild(builds, statusType.SUCCESS); cli.stopSpinner('Done'); return { success, failed, aborted, pending, unstable, count: builds.length }; }
new Promise((resolve, reject) => { oauth.client.getToken(code, (err, token) => (err ? reject(err) : resolve(token)) ); }) .then((token) => { // Get user email (to use as a Datastore key) oauth.client.credentials = token; return Promise.all([token, oauth.getEmailAddress()]); }) .then(([token, emailAddress]) => { // Store token in Datastore return Promise.all([ emailAddress, oauth.saveToken(emailAddress) ]); }) .then(([emailAddress]) => { // Respond to request res.redirect(`/initWatch?emailAddress=${querystring.escape(emailAddress)}`); }) .catch((err) => { // Handle error console.error(err); res.status(500).send('Something went wrong; check the logs.'); })
var exec = function (param, cb) { var error, name = "Expand Plugin"; if(param) { var APIURL = "http://api.longurl.org/v2/expand?url="; request({ method: 'GET', url: APIURL+query.escape(param)+"&format=json", json:true }, function (err, resp, body) { if(!err) { return cb([{ longUrl: body['long-url'] }],["text"]); } error = new Error("Cannot retrieve information about long url"); error.name = name; throw error; }); } else { error = new Error("You must specify which url you want to expand"); error.name = name; throw error; } }
httpReqOptions[label][param] = isTypeOf(_input, _type) ? (label === 'query' ? querystring.escape(_jsonify(_input)) : _jsonify(_input)) : null
for(var key in objs[i]) { str += ((key!=="STRING") ? (key + ": ") : "") + query.escape(objs[i][key]) + "\n";
URL = URL.indexOf('tbs=qdr:') >= 0 ? URL.replace(/tbs=qdr:[snhdwmy]\d*/, 'tbs=qdr:' + google.timeSpan) : URL.concat('&tbs=qdr:', google.timeSpan) var newUrl = util.format(URL, google.protocol, google.tld, google.lang, querystring.escape(query), start, google.resultsPerPage) var requestOptions = { url: newUrl,
for (var key in req.body) { if (req.body.hasOwnProperty(key)) { var value = querystring.escape(req.body[key]); postreq = postreq + "&" + key + "=" + value;
request({ method: 'GET', url: APIURL+(query.escape(param)), json: true }, function (err, resp, body) {
const urlBookShowAll = "./manifest.json/show/all"; const urlReaderNYPL = "/readerNYPL/?url=PREFIX" + querystring.escape(urlBook); const urlReaderHADRIEN = "/readerHADRIEN/?manifest=true&href=PREFIX" + querystring.escape(urlBook); + querystring.escape(urlBook); .replace(/PREFIX/g, (isSecureHttp ? querystring.escape("https://") : querystring.escape("http://")) + req.headers.host).replace(/PREFIZ/g, (isSecureHttp ?
// Get the member of the sorted set. function getMember(baseMember) { const schemaRole = querystring.escape(testRole); return useRoleAuth ? `${baseMember}:${schemaRole}` : baseMember; }
urlEncode (input){ return queryString.escape(input); }