-
Notifications
You must be signed in to change notification settings - Fork 0
Rack middleware to set application/javascript media type on xhr requests.
License
mynyml/rack-js4xhr
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
===== Summary As it is highly common to want to return javascript from an ajax request, this rack middleware will set the application/javascript media type on xhr requests. If the 'X-Requested-With' header is present, 'application/javascript' will be prepended to the Accept header, available as env['HTTP_ACCEPT']. ===== Install sudo gem install mynyml-rack-js4xhr --source=http://gems.github.com/ ===== Usage require 'rack' require 'rack/js4xhr' use Rack::Js4Xhr run App.new ===== Links source:: http://github.com/mynyml/rack-js4xhr rdocs:: http://docs.github.com/mynyml/rack-js4xhr
About
Rack middleware to set application/javascript media type on xhr requests.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published