silverstripe-framework/admin/javascript
Ingo Schommer 6e0ef669be payloadSchema support in createEndpointFetcher()
Required for REST URLs which require data to be populated on call.
For example, PUT admin/campaigns/set/:id/publish to publish a campaign.
At the time when createEndpointFetcher() is called, the ":id" parameter can not be resolved,
since the "data" argument is passed in once the returned function is evaluated (since the component using it).
Since the whole idea of createEndpointFetcher() is that components shouldn't know about the backend internals,
its not the right place to interpolate urls.

I'm sending through any payload data in addition to replacing URLs, to keep the API simple for the component.
Again, it shouldn't worry about the presence URL interpolation. The trade off here is that data will be submitted
both in the payload (in case of a POST, PUT or DELETE request), as well as (optionally) in the URL.
2016-04-12 22:03:43 +12:00
..
dist payloadSchema support in createEndpointFetcher() 2016-04-12 22:03:43 +12:00
lang Add generic React components 2016-04-06 08:35:50 +12:00
src payloadSchema support in createEndpointFetcher() 2016-04-12 22:03:43 +12:00