Hi all, I would like to know if the Prototype framework is able to detect "json" response only by the way of the non-standard header "x-json"? Is Prototype able to parse the standard "content-type" response header and detect a "not yet standard" mime type like "application/json", or something else? Thanks for this great framework. best regards, Thierry --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
David Dashifen Kees
2007-May-20 17:18 UTC
Re: [Prototype] - x-json header and json response detection
Yes, you can send put a json string in an X-JSON header and it will be evaluated and available in your callback functions. For more information, see http://prototypejs.org/api/ajax/request and look for the headings "Automatic JavaScript response evaluation" and "Evaluating JSON headers." That should answer all of your questions. - Dash - yreit wrote:> Hi all, > > I would like to know if the Prototype framework is able to detect > "json" response only by the way of the non-standard header "x-json"? > Is Prototype able to parse the standard "content-type" response header > and detect a "not yet standard" mime type like "application/json", or > something else? > > Thanks for this great framework. > best regards, > Thierry > > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
thanks a lot David, I have my answer! Thierry On 20 mai, 19:18, David Dashifen Kees <dashi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Yes, you can send put a json string in an X-JSON header and it will be > evaluated and available in your callback functions. For more > information, seehttp://prototypejs.org/api/ajax/requestand look for > the headings "Automatic JavaScript response evaluation" and "Evaluating > JSON headers." That should answer all of your questions. > > - Dash - > > yreit wrote: > > Hi all, > > > I would like to know if the Prototype framework is able to detect > > "json" response only by the way of the non-standard header "x-json"? > > Is Prototype able to parse the standard "content-type" response header > > and detect a "not yet standard" mime type like "application/json", or > > something else? > > > Thanks for this great framework. > > best regards, > > Thierry--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---