I had a use-case when I wanted to extend the exported Got instance further and override just the tls hook (the last one). But doing like below will override the beforeRequest property as a whole, removing all other useful hooks (insecureParserHook, ...) that I don't want to override.
I had a use-case when I wanted to extend the exported
Got
instance further and override just thetls
hook (the last one). But doing like below will override thebeforeRequest
property as a whole, removing all other useful hooks (insecureParserHook
, ...) that I don't want to override.So I had to manually copy paste the source code of all other hooks (basically, the whole lib), and do so:
it would be very convenient, if one could just do like this:
Or alternatively:
Maybe even combine the two approaches