X-Requested-With

X-Requested-With

I am trying to consume web services from foursquare.com, and I am using jQuery for my ajax requests but it seems that when I use POST, jQuery places a header "X-Requested-With" and because foursquare does not accept the header "X-Requested-With" I cannot consume their service.

I googled it and it seems this is a problem in the past and it was fixed. I also checked the source and there are some checks to not include the header, but it seems that when I use jQuery the problem still persists even if I use 1.5.1. I currently tested it in latest Chrome and Firefox.

I commented out the line block that puts the "X-Requested-With" on the source and it works, of course. But, are there more elegant ways to go around this?