Forum: Ruby on Rails Web Service

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
867d9e517dca53c6ea1b399afbc0ad9a?d=identicon&s=25 Iain Adams (Guest)
on 2007-07-25 11:21
(Received via mailing list)
Hi,

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.
867d9e517dca53c6ea1b399afbc0ad9a?d=identicon&s=25 Iain Adams (Guest)
on 2007-07-25 14: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
2e8848a777f7165f80da876ab1e6e7e5?d=identicon&s=25 dusty (Guest)
on 2007-07-26 00: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.
867d9e517dca53c6ea1b399afbc0ad9a?d=identicon&s=25 Iain Adams (Guest)
on 2007-07-27 17:06
(Received via mailing list)
Dusty that would be great, thanks alot
This topic is locked and can not be replied to.