[Fwd: Re: [Repoze-dev] obob example...]
Chris McDonough
chrism at plope.com
Wed Sep 12 02:21:12 UTC 2007
On Sep 11, 2007, at 10:04 PM, Mike Naberezny wrote:
> Chris McDonough wrote:
>> - It's a POST request.
>> - It has a content-type of 'text/xml'
>> - Its body isn't a multipart/form-encoded body.
>> In that case the body is intercepted as an XML-RPC request.
>
> I didn't see any "interceptor" part in your obob description, so
> that's why I am asking how this marshaling occurs in obob.
Right, sorry. I didn't talk about that piece of it because it's
orthogonal to the result. Any method can return a Python structure
and if we can serialize to something we'll try to based on metadata
in the request (as opposed to traversing to a separate method).
> Sorry, remember that I'm ignorant of Bobo/ZPublisher. I'll try to
> read up.
It's unfortunate that the only place to go is the code:
http://svn.zope.org/Zope/trunk/lib/python/ZPublisher/
>
>> Is there some convention in the wider world that a request uses to
>> signify that it wants JSON data back?
>
> No, I just used it as an example of something other than text/
> plain. In the case of JSON, the request would typically have the
> JSON content type in the Accept header.
I'll try to investigate a little. It'd be trivial to add json
serialization to obob if we could figure out how to decide when to do
it.
- C
_______________________________________________
Repoze-dev mailing list
Repoze-dev at lists.repoze.org
http://lists.repoze.org/mailman/listinfo/repoze-dev
More information about the Repoze-dev
mailing list