fastify / fastify/light-my-request

Follow redirect

Open
#209 1 comment 6 reactions 0 assignees View on GitHub
feature request
Dominant language
JavaScript
Stars
420
Forks
55
Avg merge
13d 14h
Merged PRs (30d)
1

Description

### Prerequisites

- [X] I have written a descriptive issue title
- [X] 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 https://github.com/fastify/help/issues/664

### Example

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.