# Simulating Ajax XHR

**URL:** <https://www.ruby-forum.com/t/simulating-ajax-xhr/103041>\
**Category:** Rails\
**Created:** [May 1, 2007, 3:57am UTC](https://www.ruby-forum.com/t/simulating-ajax-xhr/103041 "2007-05-01T03:57:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![robertjames](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e9c0ed/32.png) [@robertjames](https://www.ruby-forum.com/u/robertjames)\
**Post date:** [May 1, 2007, 3:57am UTC](https://www.ruby-forum.com/t/simulating-ajax-xhr/103041/1 "2007-05-01T03:57:16Z")

</div>

Is there anyway to modify a URL to pretend to be XHR (for debugging) -  
the same way you can add .xml or .js to debug those?

---

<div class="post-metadata">

**Author:** ![robertjames](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e9c0ed/32.png) [@robertjames](https://www.ruby-forum.com/u/robertjames)\
**Post date:** [May 1, 2007, 5:30am UTC](https://www.ruby-forum.com/t/simulating-ajax-xhr/103041/2 "2007-05-01T05:30:23Z")

</div>

There is a header attribute which is the only way that rails knows it  
was XHR. I forget the attribute, but it should be in Ajax on Rails.

Michael
