incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Van de Velde <thomase...@gmail.com>
Subject Re: Accessing Request Parameter in Erlang?
Date Mon, 03 Oct 2011 21:16:20 GMT
Found it:

{Query} = couch_util:get_value(<<"query">>,Req, {[]}),
MyParam = couch_util:get_value(<<"my_param">>,Query)

On Mon, Oct 3, 2011 at 12:24 PM, CGS <cgsmcmlxxv@gmail.com> wrote:

> Hi,
>
> There are only records of that type (or nested records):
>
> http://www.erlang.org/doc/**reference_manual/records.html<http://www.erlang.org/doc/reference_manual/records.html>
> http://www.erlang.org/doc/**reference_manual/data_types.**html#id72848<http://www.erlang.org/doc/reference_manual/data_types.html#id72848>
>
> and nice to read from:
>
> http://20bits.com/articles/**erlang-an-introduction-to-**records/<http://20bits.com/articles/erlang-an-introduction-to-records/>
>
> Records are more like data structures in JavaScript.
>
> Cheers,
> CGS
>
>
>
>
> On 10/03/2011 06:58 PM, Thomas Van de Velde wrote:
>
>> Hi,
>>
>> In rewriting a Javascript list function to Erlang, I came across the need
>> to
>> retrieve parameters passed in the HTTP request. In Javascript this is done
>> with req.query.myparam. Is there an equivalent in Erlang? Also, is there a
>> place where I can find more documentation?
>>
>> Thanks!
>>
>> Thomas
>>
>>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message