0

I have recently used Java Spring to create REST services. In it, there were annotations for binding each specific function to a different REST query. Lets not go too technical here, as a psuedo, it was like this:

/** list records */
@bind("/list", WebMethod.GET)
List<Record> getRecords()
{
}

/** get record */   
@bind("/record", WebMethod.GET)   
Record getRecord()   
{   
}

/** add record */    
@bind("/record", WebMethod.POST)    
void addRecord()    
{    
}

Now I am given a tesk to perform a REST with Casablanca SDK in C++, but in every tutorial I checked covers a single GET or POST request. Is it possible to bind multpile requests to custom targets similar to Spring in Casablanca SDK?

1 Answers1

0

You can make a single get function where you capture all get requests, then just get the path from the query and use a switch to call different functions to process the request for that path.

Bob Bills
  • 519
  • 4
  • 8