Skip to content

[Feature]: Add maxRedirects to options of apiRequest.newContext #35127

@cpAdm

Description

@cpAdm

🚀 Feature Request

Add maxRedirects to options parameter of apiRequest.newContext

Example

await apiRequest.newContext({
    maxRedirects: 0
});

Motivation

With API testing we have a lot of post/get request (on the same context) that we explicitly do not want to redirect. Currently this option has to be passed to each post/get/etc. call. We would like to define it instead on the APIRequestContext via the already existing options parameter such that we don't have to repeat ourselves.

Metadata

Metadata

Assignees

Labels

open-to-a-pull-requestThe feature request looks good, we are open to reviewing a PRv1.52

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions