Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • N node-http-proxy
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 482
    • Issues 482
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 102
    • Merge requests 102
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • http ... PARTY!
  • node-http-proxy
  • Issues
  • #1451
Closed
Open
Issue created Jun 01, 2020 by Administrator@rootContributor

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?

Assignee
Assign to
Time tracking