Re: JSONP with ERRest
<[email protected]> Tue, 18 Jun 2013 10:35:25 -0400
| Newsgroups | gmane.comp.web.webobjects.wonder-disc |
|---|---|
| Message-ID | <[email protected]> |
You should know that I document everything that I do :-)
> Just found this on the wiki:
>http://wiki.wocommunity.org/display/documentation/ERRest+Framework#ERRestFramework-SameOriginpolicy.
> So this had already been documented, I just came across it a little
>bit too late. :-(
> That being said, this work for me so far, however it seems that for
>every single route that I add, I need to add another almost identical
>one with HTTP verb "options". For example, if I do the following:
>
>
>
>
>
>
>
>
> restRequestHandler.addRoute(new ERXRoute(Entity.name,
>"/entities/{entity:Entity}", ERXRoute.Method.Put,
>EntityController.class, "update"));
> I also need to do:
> restRequestHandler.addRoute(new ERXRoute(Entity.name,
>"/entities/{entity:Entity}", ERXRoute.Method.Options,
>EntityController.class, "update"));
> Otherwise I get a 405 (Method not allowed) when the browser attempts
>to call "options", before calling the actual request. I wonder if
>there is a way around this?
> Martin
>
>> Subject: Re: [Wonder-disc] JSONP with ERRest
>> From: [email protected]
>> Date: Mon, 17 Jun 2013 11:18:34 -0400
>> CC: [email protected]
>> To: [email protected]
>>
>> that’s very interesting.
>>
>> why your choice of port 8888 ?
>>
>> also, how do you like using GWT or what’s behind your choice there?
>>
>> maybe we can post a wiki page about the process—
>>
>>
>> On Jun 17, 2013, at 11:08 AM, Martin B <[email protected]> wrote:
>>
>> > FYI I ended up using CORS (Cross Origin Resource Sharing) instead
>>of JSONP. With this property:
>>ERXRest.accessControlAllowOrigin=http://127.0.0.1:8888, I was able to
>>tell my ERRest application that it's OK to accept request from my GWT
>>dev client at port 8888.
>> >
>> > From: [email protected]
>> > To: [email protected]
>> > Date: Fri, 14 Jun 2013 09:02:46 -0400
>> > CC: [email protected]
>> > Subject: Re: [Wonder-disc] JSONP with ERRest
>> >
>> > Right now I'm investing most of my time figuring out the basic
>>architecture of my GWT/RestyGWT/ERRest application and I haven't
>>really spend any time thinking about security (although it's basic
>>requirement for sure). But yeah it would be great if we could
>>discuss this further at WOWODC.
>> >
>> > Martin
>> >
>> > From: [email protected]
>> > To: [email protected]
>> > CC: [email protected]
>> > Subject: RE: [Wonder-disc] JSONP with ERRest
>> > Date: Fri, 14 Jun 2013 09:00:38 -0400
>> >
>> > Right now I'm investing most of my time figuring out the basic
>>architecture of my GWT/RestyGWT/ERRest application and I haven't
>>really spend any time thinking about security (although it's basic
>>requirement for sure). But yeah it would be great if we could
>>discuss this further at WOWODC.
>> >
>> > Martin
>> >
>> > > Subject: Re: [Wonder-disc] JSONP with ERRest
>> > > From: [email protected]
>> > > Date: Wed, 12 Jun 2013 12:59:41 -0400
>> > > CC: [email protected]
>> > > To: [email protected]
>> > >
>> > >
>> > > Love to catch up at WOWODC.
>> > >
>> > > are certain post requests basically public in your case? are you
>>doing anything to authenticate these remote server requests?
>> > >
>> > > On Jun 12, 2013, at 10:35 AM, Martin B <[email protected]>
>>wrote:
>> > >
>> > > > I'm writing an application with GWT and RestyGWT
>>(http://restygwt.fusesource.org/). I want to use JSONP as a
>>workaround in GWT dev mode. The GWT dev client has to run on a
>>different port than my ERRest application which violates the same
>>origin policy. At the moment I'm only able to work if I disable
>>browser security. So I thought it would be great if I could "just"
>>use JSONP and forget about it!
>> > > >
>> > > > And yes, I will be attending WOWODC, but only Saturday and
>>Sunday.
>> > > >
>> > > > Martin
>> > > >
>> > > > > Subject: Re: [Wonder-disc] JSONP with ERRest
>> > > > > From: [email protected]
>> > > > > Date: Wed, 12 Jun 2013 10:00:45 -0400
>> > > > > To: [email protected]
>> > > > >
>> > > > >
>> > > > > what'cha doing with jsonp?
>> > > > >
>> > > > > I'm also interested --
>> > > > >
>> > > > > are you to be at WOWODC?
>> > > > >
>> > > > > jess
>> > > > >
>> > > > >
>> > > > > On Jun 12, 2013, at 9:47 AM, Martin B <[email protected]>
>>wrote:
>> > > > >
>> > > > > > I'm looking for an example or some documentation that
>>would explain how I could use JSONP with ERRest. I found some
>>information here
>>http://lists.apple.com/archives/webobjects-dev/2012/Jul/msg00184.html
>>and there https://github.com/jtayler/wonder, but I'm not sure if the
>>implementation is complete and how it can be use.
>> > > > > >
>> > > > > > Any kind of help would be greatly appreciated.
>> > > > > >
>> > > > > > Thanks.
>> > > > > >
>> > > > > > Martin
>> > > > > >
>>------------------------------------------------------------------------------
>> > > > > > This SF.net email is sponsored by Windows:
>> > > > > >
>> > > > > > Build for Windows Store.
>> > > > > >
>> > > > > >
>>http://p.sf.net/sfu/windows-dev2dev_______________________________________________
>> > > > > > Wonder-disc mailing list
>> > > > > > [email protected]
>> > > > > > https://lists.sourceforge.net/lists/listinfo/wonder-disc
>> > > > >
>> > > >
>>------------------------------------------------------------------------------
>> > > > This SF.net email is sponsored by Windows:
>> > > >
>> > > > Build for Windows Store.
>> > > >
>> > > >
>>http://p.sf.net/sfu/windows-dev2dev_______________________________________________
>> > > > Wonder-disc mailing list
>> > > > [email protected]
>> > > > https://lists.sourceforge.net/lists/listinfo/wonder-disc
>> > >
>> >
>> >
>>------------------------------------------------------------------------------
>>This SF.net email is sponsored by Windows: Build for Windows Store.
>>http://p.sf.net/sfu/windows-dev2dev
>> > _______________________________________________ Wonder-disc
>>mailing list
>>[email protected]://lists.sourceforge.net/lists/listinfo/wonder-disc
>>
>
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev