On Tuesday 30 Sep 2008, Russell Keith-Magee wrote:
> > Can I simulate this header with the test client?
>
> Yes.
>
> The full method signature for client.post() is:
> def post(self, path, data={}, content_type=MULTIPART_CONTENT, **extra):
>
> 'extra' is an argument that allows you to specify any additional
> header data that you want to send with the request. So, if you want to
>
> set the HTTP REFERRER in your request, make a call like:
> >>> response = c.post('/guestbook/', {...your data...},
> >>> HTTP_REFERRER='foo')
>
> Yours
> Russ Magee %-)
Excellent, thanks!
Tim.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---