From: Chad Perrin Date: 2011-04-30T06:56:37+09:00 Subject: Re: How do I read HTTP POST XML sent to CGI? --Q68bSM7Ycu6FN28Q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Apr 30, 2011 at 05:46:50AM +0900, Ting Chang wrote: > Hello Ruby Masters, >=20 > I am a ruby newbie and tried to use a http client to send the XML HTTP > POST request to my cgi, > I thought I can get the text I input in the HTTP POST directly from the > $stdin as a string in cgi and extract the data out. but it didn't seem > to work. >=20 > I tried to do $stdin.realines to parse every line of the $stdin but I > got nothing out of it. >=20 > Could anyone please advise ? Use the CGI library. require 'cgi' cgi =3D CGI.new cgi['parameter_name'] Note: This is from memory. I have not tested it. --=20 Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] --Q68bSM7Ycu6FN28Q Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk27MP8ACgkQ9mn/Pj01uKWifwCfXTLZzwbqWNYAKZrBQcKrcyLV yAUAmQFqkqW/GR8HgzN+O5lPkP7ZaPgX =jAqi -----END PGP SIGNATURE----- --Q68bSM7Ycu6FN28Q--