then do something like {'value': '{"key":"value"}'}, it will send
key={"key":"value"} to the server.

--
Fábio Miranda Costa
Solucione Sistemas
Engenheiro de interface


On Tue, Nov 10, 2009 at 6:59 AM, eskimoblood <[email protected]> wrote:

>
> Hi Aaron,
> I've start playing with CouchDB. The server expect an valid json
> string as request.
>
> On 9 Nov., 23:50, Aaron Newton <[email protected]> wrote:
> > you send json (objects) via the send method, but these values get changed
> > into post/get parameters. It doesn't send a JSON string as a single
> > parameter.
> >
> > .send({foo: 'bar'})
> >
> > sends the request parameter "foo" as "bar", not some unknown parameter as
> > '{"foo":"bar"}'
> >
> >
> >
> > On Mon, Nov 9, 2009 at 1:10 PM, eskimoblood <[email protected]> wrote:
> >
> > > But why does the docs say it sends and receiving JSON. My thought on
> > > this is, I can use an object and the class automatically change it to
> > > a json string that will be send.
> >
> > > On 9 Nov., 17:55, Fábio M. Costa <[email protected]> wrote:
> > > > its for receiving JSON, so you get it on your response. The values
> you
> > > send
> > > > to the server works the same as with Request.
> >
> > > > --
> > > > Fábio Miranda Costa
> > > > Solucione Sistemas
> > > > Engenheiro de interface
> >
> > > > On Mon, Nov 9, 2009 at 11:03 AM, eskimoblood <[email protected]>
> wrote:
> >
> > > > > The docs says that Request.JSON will automated sending and
> receiving
> > > > > of JavaScript Objects in JSON Format. But that seems not be true.
> > > > > Instead of using JSON.encode it uses the default formating in
> Request
> > > > > (Hash.toQueryString). Sure I can use myRequest.send(JSON.encode
> > > > > (myObject)). Is this a bug or to I understand the docs in a wrong
> way?
>

Reply via email to