AJAX Post requests

Paul pauljefferson at gmail.com
Tue Feb 10 07:27:51 EST 2009


On Feb 10, 7:37 am, Tim Roberts <t... at probo.com> wrote:
> PJ <pauljeffer... at gmail.com> wrote:
>
> >I have a simple web server using  BaseHTTPServer, and the def do_POST
> >(self) function works fine for regular forms that are submitted to it,
> >but when I send anAJAXPOST to it it does nothing (I've tried to just
> >get it to print to check it's nothing else but it doesn't even do
> >that, although it does for a regular POST request.
>
> Are you absolutely sure yourAJAXrequest is being sent with Content-Type
> multipart/form-data?  Your code would explode silently if it didn't,
> because "query" would not exist when you got to "print(query.get('data'))",
> and your blanket "except" would hide the error.
> --
> Tim Roberts, t... at probo.com
> Providenza & Boekelheide, Inc.

Thankyou for that - you're right - I'm new to AJAX so it's taking me a
bit of time to get used to it - its an application data type being
submitted



More information about the Python-list mailing list