I am calling a Server with Post method and some data. The Server needs to have the Caller's IP Address or any sort of Identity. I am using $.Post() method of JQuery to Send in my POST request from my Machine.
At he Server End, If I get the HttpRequestMessage.Referrer.Host name its showing as "localhost". I just want to know how to iclude my IP information in the referrer or Origing headers of my Http request or opening my CLient Web Application which sends the Post request using some IP is the Only go? PFB my Java Script for this..
function submitValues() {
var accno = $("#accno").val();
var amt = $("#amount").val();
var modifiedacctno = Math.floor((Math.random() * 100000) + 1);
var modifiedAmt = Math.floor((Math.random() * 10000) + 1);
var posting=$.post("http://192.168.2.3:50063/api/Transaction", { ToAccountNumber: modifiedacctno, amount: modifiedAmt }, null, "html")
posting.done(function (data) {
console.log("Data Loaded: " + data);
$("#result").empty().append(data);
});
}