List Info

Thread: extracting data




extracting data
user name
2007-06-28 05:32:01
Hi all,

I am posting some xml data to the rails server using curl. Now how do I extract the posted xml data from the http request? I saw that one can access the request parameters like params[:id] etc since params is a hash but I am not sure how the xml data can be extracted (any key to use?).

Pasted below is the console log of the server...

Thanks,
Rajmohan

C:InstantRailsrails_appssample>ruby scriptserver
=> Booting Mongrel (use 'script/server webrick9; to force WEBrick)
=> Rails application starting on http://10.0.0.1:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Starting Mongrel listening at 10.0.0.1:3000
** Starting Rails with development environment...
** Rails loaded.
** Loading any Rails specific GemPlugins
** Signals ready.  INT => stop (no restart).
** Mongrel available at 10.0.0.1:3000
** Use CTRL-C to stop.


Processing GreetingController#index (for 10.0.0.1 at 2007-06-28 15:52:30) [POST]
  Session ID: 6e614a5701545b4b876246dc292a4422
  Parameters: {"<;Data>rn  ; &nbsp; &nbsp; &nbsp; &nbsp;  <Man>;Bif Factory, Ltd.</Man>rn&nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; <mod>;4119</Mod>rn&nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; <Desc&gt;Jane's phones</Descrn&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;  </Data&gt;rn   ; &nbsp; &nbsp; rn", "action"=&gt;"index", "controller";=>";greeting&quot;}
Rendering greeting/index
Completed in 0.00010 (10000 reqs/sec) | Rendering: 0.00000 (0%) | 200 OK [http://10.0.0.1/Greeting]
--~--~---------~--~----~------------~-------~--~----~
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-talkgooglegroups.com
To unsubscribe from this group, send email to rubyonrails-talk-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )