• 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: Generic route for options on ERXRest
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Generic route for options on ERXRest


  • Subject: Re: Generic route for options on ERXRest
  • From: Michael Kondratov <email@hidden>
  • Date: Tue, 26 Jul 2016 13:05:02 -0400

Have you considered creating a subclass?

Michael

Sent from my iPhone

On Jul 26, 2016, at 12:33 PM, Luiz Alfredo Carrara Bertusso <email@hidden> wrote:

Hello developers, I've been facing a doubt about creating routes for a Rest API using ERXRest.
In the Application I've been working there some APIs for different purposes, but all of them need to access the method "optionsAction()".
I have an implementation of this method on an abstract class and all of the APIs extends it, so here comes the problem, for each API I have to create an individual route to access this method.
For example, if a have an API to list all of the entries of a specific table, then I have a route like "myURL/listAllEntries", until now it`s ok, but let me say if I want an specific entry of that table then I have to create another route like "myURL/listAllEntries/{wantedID}", it`s fine for the use of the API, but I've been heaving to create the same routes indicating the options method for all possible routes I have to crete. So I have duplicates routes for CRUD methods, but at the same time I have to do it for the options method.
Is there a way I could creste an abstract route that could cover all of the existing APIs? Something like an universal route for options method?
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
References: 
 >Generic route for options on ERXRest (From: Luiz Alfredo Carrara Bertusso <email@hidden>)

  • Prev by Date: Generic route for options on ERXRest
  • Next by Date: Re: Generic route for options on ERXRest
  • Previous by thread: Generic route for options on ERXRest
  • Next by thread: Re: Generic route for options on ERXRest
  • Index(es):
    • Date
    • Thread