Skip to content

Why runWhen is only supported in request interceptors options? #4228

Closed

Description

@googirle

Describe the issue

I read the source code in Axios.js and found that runWhen in the interceptor handlers options works only with the request interceptors, why not the same with response interceptors?

Example Code

code1

// Example code here

Expected behavior, if applicable

What should I do if I want to skip some response interceptor?

Environment

  • Axios Version [0.24.0]
  • Adapter [e.g. XHR/HTTP]
  • Browser [e.g. Chrome, Safari]
  • Browser Version [e.g. 22]
  • Node.js Version [e.g. 13.0.1]
  • OS: [e.g. iOS 12.1.0, OSX 10.13.4]
  • Additional Library Versions [e.g. React 16.7, React Native 0.58.0]

Additional context/Screenshots

Add any other context about the problem here. If applicable, add screenshots to help explain.

Activity

  1. jasonsaayman commented on Jun 18, 2022

    @jasonsaayman
    Member

    Hi 👋

    Please could you retry with the latest pre-release version and open a new issue should this error still be relevant?

    Thanks

  2. twbagustin commented on Jan 19, 2023

    @twbagustin

    runWhen support for responses is still not there at 2023, v1.2.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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