forwardemail / forwardemail/superagent

Request event doesn't allow request manipulations

Open
#1,282 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
16.6k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

https://github.com/visionmedia/superagent/blob/0e8568133dd65d498824d457a335ca6a780da1b4/lib/client.js#L771

The event doesn't allow to change anything in the request once it is called after that all the headers were added to the XHR and the data was copied and manipulated before the event is fired

Would be nice that it happens before so all the request data were inserted in the XHR object so we can change request headers or bodies before the request data was closed for changes

`.use` is not always relevant because in my case I would like to add a specific header if the request body contains a specific data cross application

THX

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.