HTTP REQUEST/RESPONSE

0 views
Skip to first unread message

Chatchai Neanudorn

unread,
Jan 29, 2007, 11:36:18 AM1/29/07
to django-users
I need to know what is structure of request/response create by django. How to capture or are there any tools to see what request and response is?
 
Thank
chatchai 

James Bennett

unread,
Jan 29, 2007, 11:40:00 AM1/29/07
to django...@googlegroups.com
On 1/29/07, Chatchai Neanudorn <meled...@gmail.com> wrote:
> I need to know what is structure of request/response create by django. How
> to capture or are there any tools to see what request and response is?

http://www.djangoproject.com/documentation/request_response/

--
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."

Chatchai Neanudorn

unread,
Jan 29, 2007, 11:45:37 AM1/29/07
to django...@googlegroups.com
I have already read it. But what I mean is, I need to write other program (java,.net) to use my django app (generate a http post request messge and extract a response to get data  ). so, I need to know a real-format.
Anyway, thank very. Other idea is welcomed.
chatchai

 
2007/1/29, James Bennett <ubern...@gmail.com>:

James Bennett

unread,
Jan 29, 2007, 12:11:22 PM1/29/07
to django...@googlegroups.com
On 1/29/07, Chatchai Neanudorn <meled...@gmail.com> wrote:
> I have already read it. But what I mean is, I need to write other program
> (java,.net) to use my django app (generate a http post request messge and
> extract a response to get data ). so, I need to know a real-format.
> Anyway, thank very. Other idea is welcomed.
> chatchai

Pedantic answer:

HTTP requests coming in to Django have this format:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5

HTTP responses coming out of Django have this format:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html#sec6

Useful answer:

It's just HTTP. There are varying formats of Python objects getting
shuffled around inside Django to represent requests and responses, but
you won't be able to access them from Java (not even Jython, since it
doesn't support a high enough Python version to use Django).

So use Java's built-in HTTP request classes to send requests to
Django, and use Java's built-in HTTP response classes to read what you
get back. They're just plain old HTTP.

Reply all
Reply to author
Forward
0 new messages