jQuery serialize proxy issue

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

jQuery serialize proxy issue

a3aan
Some proxies do not allow (very) long urls in an HTTP GET. This means that
JQAjax>serialize: won't work. It requires you to make it an HTTP POST.
Like this

serialize: aQuery
        "Serialize the elements matching aQuery and evaluates the associated
callbacks."

        self class = JQAjax ifTrue: [self type: 'POST'].

        self enableCallbacks.
        self addParameter: aQuery serialize
.

Cheers,
Adriaan.

--
http://www.a3aan.st

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: jQuery serialize proxy issue

Lukas Renggli
Hi Adriaan,

For Seaside it doesn't matter much if there is a GET or POST request,
but if you are calling external services or are using Seaside-REST it
might make a big difference. I think it would be wrong to try to
change the request type behind the back of the user. It would be
possible to change the default request type in Seaside, but then it
would be different to the default GET that JQuery clearly documents
(http://api.jquery.com/jQuery.ajax). I suggest not to change it.

Lukas

On 27 August 2011 17:08, Adriaan van Os <[hidden email]> wrote:

> Some proxies do not allow (very) long urls in an HTTP GET. This means that
> JQAjax>serialize: won't work. It requires you to make it an HTTP POST.
> Like this
>
> serialize: aQuery
>        "Serialize the elements matching aQuery and evaluates the associated
> callbacks."
>
>        self class = JQAjax ifTrue: [self type: 'POST'].
>
>        self enableCallbacks.
>        self addParameter: aQuery serialize
> .
>
> Cheers,
> Adriaan.
>
> --
> http://www.a3aan.st
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>



--
Lukas Renggli
www.lukas-renggli.ch
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside