In the POST method, how could we customize the response code / values? For instant when you insert the value to database, while sending the 200OK back - you want to send a SID back to client side.
In addition; what is the best way to customize the response codes on unexpected exception raised during server request?
In this line; how we could create a same method with different parameters list (so it could be invoked with optional parameters in client side)? Could we somehow use overload?
[HttpGet] function GetCustomerByName(Name: string): TCustomer; overload
[HttpGet] function GetCustomerByName(Name: string; Address:string): TCustomer; overload
The [XDefault] default attribute only needs to be in interface declaration. Other than this you need to implement your function as usual, of course the signature in implementation must be the same as in interface and you need to implement the function.
Hello Wagner; for some reason this is not working for me. May you please incorporated this to the "TCustomer" class example you sent before (the goal is to invoke this via http client)?
Assume I want to have a method to invoke the list of customers once by "Id", then by "Id and Name" and finally by "Id, Name and Country".