html jQuery ajax 400 Bad Request - solved

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

html jQuery ajax 400 Bad Request - solved

Paul DeBruicker
Hi -

I just spent a little over an hour or so trying to figure out why a JQAjax>>#callback:json: was resulting in a 400 Bad Request error. The error occurred because the JSON body was to long to send in a GET request.  When I switched from

html jQuery ajax callback:[:json | self processJson: json] json: (JSStream on: 'myInterestingVariable')


to


html jQuery post callback:[:json | self processJson: json] json: (JSStream on: 'myInterestingVariable')



everything worked out great because POST body sizes are allowed to be longer, and that length is set by the server, not the spec.  


So I'm just sending this note to my future self for the next time I forget this is how the world is.

Please forgive the noise.  


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

Re: html jQuery ajax 400 Bad Request - solved

Sven Van Caekenberghe-2
Thanks a lot Paul, things like this are very useful !

> On 13 Nov 2016, at 20:24, PAUL DEBRUICKER <[hidden email]> wrote:
>
> Hi -
>
> I just spent a little over an hour or so trying to figure out why a JQAjax>>#callback:json: was resulting in a 400 Bad Request error. The error occurred because the JSON body was to long to send in a GET request.  When I switched from
>
> html jQuery ajax callback:[:json | self processJson: json] json: (JSStream on: 'myInterestingVariable')
>
>
> to
>
>
> html jQuery post callback:[:json | self processJson: json] json: (JSStream on: 'myInterestingVariable')
>
>
>
> everything worked out great because POST body sizes are allowed to be longer, and that length is set by the server, not the spec.  
>
>
> So I'm just sending this note to my future self for the next time I forget this is how the world is.
>
> Please forgive the noise.  
>
>
> Paul  
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside