This PR adds in the ability for a request to have a postProcessing method. To implement it, I have done the following:
Added postProcess method to Netable request, that by default returns the FinalResource. This will now be the final method run through every request.
If the user adds a post process method to the request, something can be run before the FinalResource is returned.
I have added in a simple example to the Example project, where we have a Data Manager that stores a user. The GetUserRequest implements the postProcess method, where we send the user to the shared user object in the DataManager before returning the finalResource.
In Homeview, I added a print method to showcase this working.
Note: I also removed the target here for the old example. I think that was also done in the sendable ticket which hasn't been merged, but if not it's done here now! Whichever ticket is merged first, I will rebase the other, so it shouldn't matter.
This PR adds in the ability for a request to have a postProcessing method. To implement it, I have done the following:
postProcess
method to Netable request, that by default returns theFinalResource
. This will now be the final method run through every request.FinalResource
is returned.Example
project, where we have a Data Manager that stores a user. TheGetUserRequest
implements thepostProcess
method, where we send the user to the shared user object in the DataManager before returning the finalResource.Note: I also removed the target here for the old example. I think that was also done in the sendable ticket which hasn't been merged, but if not it's done here now! Whichever ticket is merged first, I will rebase the other, so it shouldn't matter.