Skip to content

More intelligent selfHandleResponse  #1451

@lukenofurther

Description

@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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions