Comment 1 for bug 1261046

Revision history for this message
Adnane Belmadiaf (daker) wrote : Re: Support for Safe Browsing API

try {
    var req = new XMLHttpRequest();

    req.onreadystatechange = function () {
        if (req.readyState == XMLHttpRequest.DONE) {
            console.debug("Debug: " + req.responseText)
        } else {}
    };

    req.open("GET", "https://sb-ssl.google.com/safebrowsing/api/lookup?client=api&apikey=ABQIAAAAXn2CrqC-zz0c0lI_8NfQbBQJyEjSvtjLID-f8-9JQcCAZT-Bkg&appver=1.0&pver=3.0&url=" + requestedUrl);
    req.send();
} catch (e) {
    throw new Error("Unable to parse data.");
}