On 16 juin, 18:13, Matt Raible <[email protected]> wrote:
> I'm trying to convert the makeSignedRequest function on the following
> page into a JSNI method.
>
> http://paul.donnelly.org/2008/10/31/2-legged-oauth-javascript-functio...
>
> If I put the raw JS in my HTML page and call it with
> $wnd.makeSignedRequest(), everything works fine. However, if I move it
> into a JSNI method (and use $wnd.OAuth), the parameters:
> [["oauth_version","1.0"],["oauth_consumer_key",ck]] gets written as:
>
> 0=oauth_version%3D1.0&1=oauth_consumer_key%3Dmy_key
>
> instead of:
>
> oauth_version=1.0&oauth_consumer_key=my_key
>
> Does anyone know how I might go about fixing this?
Probably there's a check for the parameters to be an array (or not),
which doesn't work cross-window (the GWT code runs in an IFrame, which
is another browsing-context/window). The array is detected as being an
object, using array indices as keys for key/value pairs, instead of
just using array items' value.
See http://blog.360.yahoo.com/blog-TBPekxc1dLNy5DOloPfzVvFIVOWMB0li?p=916
(which com.google.gwt.json unfortunately doesn't use, FWIW)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---