A suggestion
EloB opened this issue · comments
Hello mate!
I saw this line:
Line 38 in 11d0a13
Isn't better to use URL
? I'm having a problem that it adds pathname
twice after each other that fails my request. Like /my/pathname/mypathname
instead of /my/pathname
. I'm not sure this is the right way to do it or if it's a different puzzle...
const { URL } = require('url');
const { origin: baseUrl } = new URL(response.url);
Best regards!
I also want to say you made an awesome library ❤️
Can you provide an example URL you are having issue with?
I have a PR for this, with an example URL: #25