Re: Deep ERRest knowledge? - I'm adding an ERXJSONPRestWriter
Re: Deep ERRest knowledge? - I'm adding an ERXJSONPRestWriter
- Subject: Re: Deep ERRest knowledge? - I'm adding an ERXJSONPRestWriter
- From: Pascal Robert <email@hidden>
- Date: Fri, 13 Jul 2012 19:50:58 -0400
That's overkill :-) It should be implemented like the window.name transport, e.g. ERRest will look at the request to see if a "callback" query argument was passed, and if yes, wrap it.
> I'm adding an ERXJSONPRestWriter in Wonder, to support JSONP in ERRest
>
> so, like getting any ERRest format request, you can now also get jsonp:
>
> /ra/Person/306.jsonp
>
> so far, so good
>
> the spec. calls for an optional callback method name, requested on the URL
>
> /ra/Person/306.jsonp?callback=parseResponse
>
> or, it seems less commonly:
>
> /ra/Person/306.jsonp?jsonp=parseResponse
>
> The RestWriter didn't have access to the originating request, so I figured I'd send in the method name through the userInfo dictionary and I'd be able to pick that up in the writer?
>
> So, I thought I'd write something like a ERXJSONPRestResponseWriter?
>
> But that's not really what I should do? I can see I'm onto the wrong track here -
>
> Does anyone know the internals of ERRest well enough to help guide me just a bit here?
>
> I suspect if I can get my head around the design, I can check in this stuff in case anyone needs cross origin or jsonp support for whatever reason.
>
> Thanks for any advice!
>
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden