ladjs / superagent

Ajax for Node.js and browsers (JS HTTP client). Maintained for @forwardemail, @ladjs, @spamscanner, @breejs, @cabinjs, and @lassjs.
https://ladjs.github.io/superagent/
MIT License
16.58k stars 1.33k forks source link

Make it possible to send in own encoder function as part of options object #1612

Closed willeeklund closed 2 years ago

willeeklund commented 3 years ago

The library does not support sending in your own encoder function as argument to .auth() (encoder is hard coded there). This PR makes it an optional option. Without this PR one needs to use the internal ._auth() method, which is bad practise.

.auth(): https://github.com/visionmedia/superagent/blob/master/src/client.js Screenshot 2020-12-08 at 12 22 46

._auth(): https://github.com/visionmedia/superagent/blob/1277a880c32191e300b229e352e0633e421046c8/src/request-base.js#L514 Screenshot 2020-12-08 at 12 21 05

titanism commented 2 years ago

see https://github.com/visionmedia/superagent/pull/1720

titanism commented 2 years ago

v7.1.3 released https://github.com/visionmedia/superagent/releases/tag/v7.1.3