Forum: Ruby on Rails Web Service

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Iain A. (Guest)
on 2007-07-25 13:21
(Received via mailing list)

I am writing a ruby on rails web service that needs to be accessed
from a mobile phone. There is a mobile phone plugin that has been
developed that will call the web service. Now the real trouble is that
I need to access the HTTP headers from the webservice request. There
is a header variable HTTP_X_WAP_PROFILE, which is present. Does anyone
know how to access these headers? Also this is assuming that the
webservice will be able to recieve normal HTTP requests and that the
mobile phone will make this kind of request. I don't really understand
if the HTTP headers  will be present.
Iain A. (Guest)
on 2007-07-25 16:00
(Received via mailing list)
Okay turns out I was going about this the wrong way. You can simply
have the controller as a normal controller
, create a new route that passes the HTTP post params. Then just
return an XML page
dusty (Guest)
on 2007-07-26 02:17
(Received via mailing list)
For example, request.env["HTTP_USER_AGENT"]

I actually wrote something to parse the wurfl xml file, store it in a
db, and then make it easy to access.  Its been a while since I looked
at the code, but I can post it if a few people are interested.  Might
have to clean it up a bit first.
Iain A. (Guest)
on 2007-07-27 19:06
(Received via mailing list)
Dusty that would be great, thanks alot
This topic is locked and can not be replied to.