cgi and 1.8 
Author Message
 cgi and 1.8

ruby'ists-

the old cgi library returns parameters as an array

  cgi['k'] => ['v']

the new interface returns parameters as a string

  cgi['k'] => 'v'

but what if

  http://www.*-*-*.com/

??

and

  cgi['k'] => ['v0','v1','v2','v3']

is desired??

how is this done using the new api?

-a

--

 ====================================
 | Ara Howard
 | NOAA Forecast Systems Laboratory
 | Information and Technology Services
 | Data Systems Group
 | R/FST 325 Broadway
 | Boulder, CO 80305-3328

 | Phone:  303-497-7238
 | Fax:    303-497-7259
 ====================================



Sat, 30 Jul 2005 01:02:32 GMT  
 cgi and 1.8

Quote:
>   cgi['k'] => ['v0','v1','v2','v3']

> is desired??

> how is this done using the new api?

i beleive:

        cgi.params['k']

will give you the array.

--
tom sawyer, aka transami



Sat, 30 Jul 2005 02:32:04 GMT  
 cgi and 1.8
Hi,


Quote:
>   http://www.foo.bar/cgi-bin/ruby.cgi?k=v0&k=v1&k=v2&k=v3

> ??

> and

>   cgi['k'] => ['v0','v1','v2','v3']

> is desired??

try cgi.params['k'], which returns an array.

Francois



Sat, 30 Jul 2005 02:34:21 GMT  
 cgi and 1.8

Quote:


> >   cgi['k'] => ['v0','v1','v2','v3']

> > is desired??

> > how is this done using the new api?

> i beleive:

>    cgi.params['k']

> will give you the array.

thanks!

i'm sure it's been posted somewhere - but is there any effort towards 1.8 docs
available online?

-a

--

 ====================================
 | Ara Howard
 | NOAA Forecast Systems Laboratory
 | Information and Technology Services
 | Data Systems Group
 | R/FST 325 Broadway
 | Boulder, CO 80305-3328

 | Phone:  303-497-7238
 | Fax:    303-497-7259
 ====================================



Sat, 30 Jul 2005 02:51:54 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. 1.8 cgi lib

2. ANN: Cross-compile Valentina for REALbasic Professional 1.8 released

3. Harbour FAQ revision 1.8 now on-line

4. Answers to Frequently Asked Questions (version 1.8, 15-Jan-92)

5. Slang 1.8 released

6. Free PBMake 1.8 (updates/bugfixes from user feedback are included)

7. New ILU 1.8 Common Lisp support available

8. ILU 1.8 now available

9. The Language List Version 1.8 - Part 9 of 9

10. The Language List Version 1.8 - Part 8 of 9

11. The Language List Version 1.8 - Part 7 of 9

12. The Language List Version 1.8 - Part 6 of 9

 

 
Powered by phpBB® Forum Software