rsm-hcd / AndcultureCode.JavaScript.React

Common patterns, functions, etc... used when building react applications
6 stars 8 forks source link

Add a ServiceOptions param to Services #53

Open jhugs opened 3 years ago

jhugs commented 3 years ago

Use case: There is a need to add a Cache-Control header to a request to disable caching from the frontend. Rather than add a simple parameter such as skipCache, this could be plumbed through as an options object to allow more flexibility in the future. This would be needed on at least get and list calls to start with. Included options on the object for the caching property should follow the spec, see https://docs.microsoft.com/en-us/aspnet/core/performance/caching/response?view=aspnetcore-5.0

brandongregoryscott commented 3 years ago

The bulk of the work for this has been done on my fork on the feature/service-options branch. Leaving it pushed up but not opening a PR just yet as we ran into some issues trying to pull the package into a local project for testing.