• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Options for all routes on ERRest
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Options for all routes on ERRest


  • Subject: Re: Options for all routes on ERRest
  • From: Matthew Ness <email@hidden>
  • Date: Wed, 25 Jan 2017 07:15:25 +1100

Hi Luiz,

Can you identify what is going on when it is working and what is going on when it is not?

Take a look at ERXRouteController and its optionsAction() method.

I typically have a default route controller class (extends ERXDefaultRouteController) for all of my controllers in my applications or frameworks where you can fine tune the headers to be read and written, as well as control other authentication routines, etc.

Depending on how you want to deal with CORS, preflight, and limiting HTTP methods at your end points, that method might point you in the right direction.

Regards,

--
Matt
http://logicsquad.net


On Tue, Jan 24, 2017, at 11:45 PM, Luiz Alfredo Carrara Bertusso wrote:
I`ve been setting the option method for all possible routes on the API I`m working on, but sometimes it works and sometimes it doesn't. 
Nowadays I have to do this for every route:


restRequestHandler.addRoute(new ERXRoute(MyEntity.ENTITY_NAME, "/MyRoute",                          ERXRoute.Method.Options, MyController.class, "options"));



My concern is if it`s possible to apply this route for every declared route just once and the framework automatically handles this.

Thank you.
_______________________________________________
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

References: 
 >Options for all routes on ERRest (From: Luiz Alfredo Carrara Bertusso <email@hidden>)

  • Prev by Date: TBDC 2017
  • Next by Date: Wo and Saml2
  • Previous by thread: Options for all routes on ERRest
  • Next by thread: TBDC 2017
  • Index(es):
    • Date
    • Thread