instance method xml_http_request?

Ruby on Rails 2.2.3

Since v2.2.3 Last seen in v2.2.3

Signature

xml_http_request?()

Returns true if the request’s “X-Requested-With” header contains “XMLHttpRequest”. (The Prototype Javascript library sends this header with every Ajax request.)

Source
# File actionpack/lib/action_controller/request.rb, line 196
    def xml_http_request?
      !(@env['HTTP_X_REQUESTED_WITH'] !~ /XMLHttpRequest/i)
    end

Defined in actionpack/lib/action_controller/request.rb line 196 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionController::AbstractRequest

Type at least 2 characters to search.

↑↓ navigate · open · esc close