On Mon, Nov 17, 2008 at 11:45 AM, Diez B. Roggisch <[EMAIL PROTECTED]> wrote:
>
> On Monday 17 November 2008 09:16:09 drakkan wrote:
>> Hi all,
>>
>> I'm building an application backed using turbogears, so I have to
>> develop some api for other applications, I would like some directions
>> to modify @authorize.require in a way that it return a json response
>> instead to redirect to login page,
>>
>> can someone give me some directions?
>
> Maybe it would work for you to make the login-page return JSON as well (if the
> headers of the request require it)?

Maybe the return code should be handled by the client because if you
get redirected to the login page you have something different than
200. Returning JSON from the login seems sensible also.
I agree with Diez: @require does not return anything per-se and should
not be modified to return something.

Florent.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to