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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow redirect #209

Open
2 tasks done
Eomm opened this issue Jul 22, 2022 · 1 comment
Open
2 tasks done

Follow redirect #209

Eomm opened this issue Jul 22, 2022 · 1 comment

Comments

@Eomm
Copy link
Member

Eomm commented Jul 22, 2022

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the feature has not already been requested

🚀 Feature Proposal

When a response has 301/302 status code, the inject should follow the redirects

Motivation

Ref fastify/help#664

Example

const response = await app.inject({
      url: '/asd',
      method: 'GET',
      followRedirect: true // default max 1 redirect
      // OR
      followRedirect: 10 // follow max 10 redirect
    });
@mcollina
Copy link
Member

I think this could be a plugin.

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

No branches or pull requests

2 participants