Click here to Skip to main content
15,887,930 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,
In jquery ajax function I am passing token and id with header as below as a cross domain request
$.ajax({
C#
error: function (xhr, status, error) { alert(error); },
                    beforeSend: setHeader
                });


C#
function setHeader(xhr) {
            xhr.setRequestHeader('X-ProspectAppApiKey', '8EJBD14I:f9a2ac88-6a76-48cf-vcvcvc-3f54bb830703');
        }


Now at service end I want to get header '8EJBD14I:f9a2ac88-6a76-48cf-vcvcvc-3f54bb830703" using

request.Headers.GetValues("Access-Control-Request-Method");

but I am getting only X-ProspectAppApiKey not 8EJBD14I:f9a2ac88-6a76-48cf-vcvcvc-3f54bb830703 with this please help .

Thanks
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900