Closed gdombiak closed 8 years ago
I think you can use Attributes if you want to make the request and responses DRY but still have the capacity to add Headers.
Resource Model is a concept which is limited about what it can do.
Thanks for the response. I will explore the option of using 'includes' then. Not as strong as expressing what is the model of a resource but at least I can define the model in one place.
I'm using +Model to define what my resource is and then in the actions I reference my model. Here is an example of my resource
Here we see an example of a PUT operation:
The PUT request will include If-None-Match header and the response will include ETag header. Is it possible to specify request headers and response headers when using models?
Thanks, Gaston