Hey Nico,
there is an issue explaining your case:
https://github.com/typhoeus/typhoeus/issues/201, especially
https://github.com/typhoeus/typhoeus/issues/201#issuecomment-7050743. The problem is, that your params are difficult to urlencode.
What you receive in your app is somewhat correct. In order to get what you expect, you could try this solution:
https://gist.github.com/3417977. I didn't test that.
--
Hans
On Wednesday, November 28, 2012 at 4:32 AM, Nico Bantatua wrote:
> Hi guys,
>
> I'm currently stumped with this, too.
>
> I have
> response = Typhoeus::Request.new("
http://localhost:3000/events/tick.txt", :method => :post, :headers => {:content_type => "application/json", :accept => "application/json"}, :body => @params).run
>
> with @params = {:version=>"0.3.0", :login=>"user", :password=>"password", :items => [{:type=>"Miscellaneous", :length_in_seconds=>"612", :guid=>"22534"}, {:type=>"Work", :length_in_seconds=>"547", :guid=>"43765"}]}
>
> and somehow my app logs receives the :items wrong
> "items"=>{"0"=>{:type=>"Miscellaneous", :length_in_seconds=>"612", :guid=>"22534"}, "1"=>{:type=>"Work", :length_in_seconds=>"547", :guid=>"43765"}}
>
> Thanks in advance!
>
> -Nico
> > > > > > To post to this group, send email to
typh...@googlegroups.com (javascript:).
> > > > > > To unsubscribe from this group, send email to
> > > > >
> > > >
> > > >
typhoeus+u...@googlegroups.com (javascript:).
> > > > > > For more options, visit this group athttp://
> > > > >
> > > >
> > > >
groups.google.com/group/typhoeus?hl=en (
http://groups.google.com/group/typhoeus?hl=en).
> > >
> > >
> > > > --
> > > > You received this message because you are subscribed to the Google Groups
> > > > "Typhoeus" group.
> > > > To post to this group, send email to
typh...@googlegroups.com (javascript:).
> > > > To unsubscribe from this group, send email to
> > > >
typhoeus+u...@googlegroups.com (javascript:).
> --
> You received this message because you are subscribed to the Google Groups "Typhoeus" group.
> To view this discussion on the web visit
https://groups.google.com/d/msg/typhoeus/-/pOczF4zuX_4J.
> To post to this group, send email to
typh...@googlegroups.com (mailto:
typh...@googlegroups.com).
> To unsubscribe from this group, send email to
typhoeus+u...@googlegroups.com (mailto:
typhoeus+u...@googlegroups.com).