Chrome Extension Send POST Request

In background.js

chrome.tabs.onUpdated.addListener( function(tabId, changeInfo, tab) {

    if(changeInfo.status == "loading"){

        var request = new XMLHttpRequest();

        request.open("POST", "http://www.oh-hi-denny.com/", true);
        request.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
        request.send(JSON.stringify({denny: 1, mark: 1, johnny: 0}));
    }
});

https://stackoverflow.com/questions/32603362/can-chrome-extension-send-post-request-when-user-navigates-any-site

Advertisements