More intelligent selfHandleResponse
Created by: lukenofurther
In my use case I need to do some custom transformations on the response but only for a small subset of requests.
I can perform custom processing on the response if I set selfHandleResponse
to true. However, for all requests that I don't want to do anything custom to, I must copy this library's source code and do the hacky workaround suggested on this other issue.
That hacky solution works at the moment but is bad, easily broken by a future update to the library.
I suggest allowing a more customisable value for the selfHandleResponse
option. The simplest option would be accepting a function (in addition to true/false), which when supplied is used to check whether to perform the default incoming processing or leave it to be handled in a custom manner.
Is there an alternative non-hacky way for me to achieve what I need to achieve? Would the above be a valuable enhancement?