Tuesday, 19 October 2021

Override post requests

I have this code that I put in my console:

XMLHttpRequest.prototype.send = function(body) {
    // modifies inputted request
    newBody = JSON.parse(body);
    newBody.points = 417;

  // sends modified request
    this.realSend(JSON.stringify(newBody));
}

It is supposed to make the points 417 every time it sends a request, but when I look at the request body, it still says the original amount of points. Any help?



from Override post requests

No comments:

Post a Comment