function makeHttpRequestThroughProxy() {
var headers = {
'Content-Type': 'application/json'
};
var options = {
method: 'GET',
headers: headers,
mode: 'cors',
redirect: 'follow',
follow: 'manual',
muteHttpExceptions: true,
// Add the login and password for the proxy server
headers: {
'Proxy-Authorization': 'Basic ' + Utilities.base64Encode('ledye:2V8bpZ')
}
};
var response = UrlFetchApp.fetch(proxyUrl + '?url=' + encodeURIComponent(targetUrl), options);
var content = response.getContentText();
var title = content.match(/<title>(.*?)<\/title>/i)[1];
SpreadsheetApp.getActiveSpreadsheet().getActiveSheet().getRange("A1").setValue(title);
}