From: Tony De Date: 2008-04-04T16:28:30+09:00 Subject: Re: Responding to AJAX - XMLHttpRequest Matt Todd wrote: > One thing to note is that it is expecting a Content-Type of > application/json as well as the content to be in actual JSON format. > You can simply require 'json' and call wts.to_json which should be > sufficient for your needs. > > You might consider looking at Rack for building your tiny web app and > just proxy some address to it; it really cleans up handling requests > and not needing CGI, but your solution does work fine and avoids a > problem with AJAX requests failing due to cross-server requests (which > is what requests not on port 80 are considered). > > Matt Todd Hey Matt, Thanks for the awesome quick reply. I'll dig into that. That's the first I heard of this from any blog or forum. But there's some sense to what you say. I've got to get ruby_json on my freebsd server. I'll let you know how it goes. Thanks! tonyd -- Posted via http://www.ruby-forum.com/.