On second glance, ``Client.post`` does support raw posting ``data`` as
a ``str``, as long as you pass your own ``content_type`` with it. It's
not in the docs, or the method's docstring, but it's easy to do.

On Jan 23, 4:46 am, Russell Keith-Magee <[email protected]>
wrote:
> On Mon, Jan 17, 2011 at 1:16 AM, Vincent <[email protected]> wrote:
> > When looking through the test client I noticed that it requires a
> > dictionary and always uses multipart/form-data posts. Sometimes it's
> > helpful to use a raw post, instead. The flexibility allows you to just
> > post a string, use key-value pair format, or anything you want,
> > really. Using raw posts wouldn't be suitable for Django's model forms,
> > etc, but one specific example is the JSON-RPC spec which requires a
> > raw post of JSON (instead of key-value pairs or multipart/form-data).
>
> > I could write the code, if this seems like a reasonable addition.
>
> Yes, it seems like a reasonable addition to me. Feel free to open a
> ticket and provide a patch.
>
> Yours,
> Russ Magee %-)

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" 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-developers?hl=en.

Reply via email to