Daniel Roseman suggests a very simple and easy to implement solution.
Malcolm Tredinnick explained the usage of request.POST and
request.raw_post_data. I think I would like to keep it pure and go
towards implementing django views that will access and process
request.raw_post_data. The AIR app will do an HTTP POST that will
contain xml in the body of the message.

Just wondering, if this were to be done purely in django, how would
one go about doing a pure HTTP POST request through a django template?
Or am I confusing two tangentially separated ideas?

Regards.

On Dec 1, 5:48 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Sun, 2008-11-30 at 01:15 -0800, Daniel Roseman wrote:
>
> [...]
>
> > No doubt someone will correct me if I'm wrong, but I don't think there
> > *is* any other way of receiving a file via POST except via a form.
>
> You gave an answer, so it's going to look crabby to say this, but that
> isn't correct. You can send anything in the body of an HTTP POST request
> and Django will be able to work with it. What you cannot do is use
> request.POST to access the data, since that does form-decoding. Instead,
> use request.raw_post_data, which is the unprocessed input data (and
> check request.METHOD to see which method was used to submit the data --
> POST, PUT, etc).
>
> Regards,
> Malcolm
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" 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/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to