Vipul Panth Vipul Panth - 1 year ago 100
Javascript Question

Navigator.sendBeacon() to pass header information

I am using navigator for communicating with the server , but problem is that we need to pass some header information as there is filter which recognise the request is from the valid source.

Can anybody help on this?


Answer Source

After searching for an answer for this question i found out that for passing header with navigator we need to pass a blob object.

For example

var hearders = {type : 'application/json'};
var blob = new blob(request , headers);


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download