Skip to content

interceptors.response async support #214

Closed
@rhobot

Description

@rhobot

Hi! I have a question/request regarding interceptors.response.

I've noticed that making interceptors.response function as async doesn't work. But there are some use cases where awaiting calls in the function is useful. For example, I would like to pre-parse json in the interceptor.

<Provider options={{
  interceptors: {
    async response(response) {
      // ...
      response.parsedBody = await response.json() 
      return response
    }
  }
}} ...>

I was wondering whether async is supported for interceptors.response or it will be supported in the future. Or I was wondering this is by design.

Thanks.

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