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. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 On 25 Jul, 10:20, Iain Adams <aca04...-3Ch7lUbXYW61Qrn1Bg8BZw@public.gmane.org> wrote:> 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.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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. On Jul 25, 5:20 am, Iain Adams <aca04...-3Ch7lUbXYW61Qrn1Bg8BZw@public.gmane.org> wrote:> 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.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Dusty that would be great, thanks alot On 25 Jul, 23:16, dusty <dusty.do...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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. > > On Jul 25, 5:20 am, Iain Adams <aca04...-3Ch7lUbXYW61Qrn1Bg8BZw@public.gmane.org> wrote: > > > 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.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---