nxtbgthng / OAuth2Client

Client library for OAuth2 (currently built against draft 10 of the OAuth2 spec)
855 stars 217 forks source link

Passing dictionary resulted in "NXOAuth2PostBodyPart with illegal type" #81

Closed vleango closed 11 years ago

vleango commented 11 years ago

My dictionary has another dictionary inside of it. When I try to use "PUT" with my NXOAuth2Request, i get this error: "NXOAuth2PostBodyPart with illegal type". Here is my dictionary:

{ "Person" => {"name"=>"John"} }

vleango commented 11 years ago

There doesn't seem to be a method for this (nsdictionary / hash). I need a hash to send to my rails app.

vleango commented 11 years ago

I just learned that passing the key like this works: Person[name]

mattvague commented 9 years ago

I just learned that passing the key like this works: Person[name] @vleango can you reiterate what you mean by this? I'm having the same problem

vleango commented 9 years ago

@mattvague i'm not really good with rails, but i learned that if I needed {"person" => {"first" => "john", "last" => "denver"}} be sent as a param, I would need to send it like this:

@{"person[first]" : "john", "person[last]" : "denver"};