Hi!
It would be more logical to use onRedirect, onRequest, and onResponse in the client.request itself, rather than in the Koon class.
Example: https://github.com/sindresorhus/got/blob/main/documentation/9-hooks.md
When the request is executed, I can do almost everything, namely: handle errors, modify headers and cookies, the request body...
Hi!
It would be more logical to use onRedirect, onRequest, and onResponse in the client.request itself, rather than in the Koon class.
Example: https://github.com/sindresorhus/got/blob/main/documentation/9-hooks.md
When the request is executed, I can do almost everything, namely: handle errors, modify headers and cookies, the request body...