Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ctx): Add "ctx.forward" for forwarding requests #923

Closed
wants to merge 2 commits into from
Closed

feat(ctx): Add "ctx.forward" for forwarding requests #923

wants to merge 2 commits into from

Conversation

lsroa
Copy link

@lsroa lsroa commented Sep 22, 2021

This tries to solve the discussed here #676 @kentcdodds @kettanaito
Probably the test needs some improvements 馃

@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 22, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 2321f88:

Sandbox Source
MSW React Configuration

Copy link
Contributor

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried this locally and it doesn't work I'm afraid. The res is just this:

{
  status: 200,
  statusText: 'OK',
  body: null,
  delay: 0,
  once: false,
  headers: HeadersPolyfill {
    _headers: { 'x-powered-by': 'msw' },
    _names: Map(1) { 'x-powered-by' => 'x-powered-by' }
  }
}

It's basically an empty response. I'm not sure where the issue is, but this won't work as it is today I'm afraid.

@kettanaito
Copy link
Member

Hey, @lsroa. Thank you so much for your work on this feature. I've decided to go with #1204.

@kettanaito
Copy link
Member

Released: v0.40.0 馃帀

This has been released in v0.40.0!

Make sure to always update to the latest version (npm i msw@latest) to get the newest features and bug fixes.


Predictable release automation by @ossjs/release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants