Closed fengkx closed 4 years ago
Related to #1234
Got 11 transform http://www.newsmth.net/rss.php?mPicture
into http://www.newsmth.net/rss.php?mPicture=
which body is empty
As suggested by @cookch10 this is a temporary workaround
const url = new URL('http://www.newsmth.net/rss.php?mPicture');
const _search = url.search;
Object.defineProperty(url, 'search', {
get() {
return _search;
},
set() {
}
});
;(async () => {
const resp = await got.get(url);
console.log(resp);
})()
Duplicate of #1234
Describe the bug
Actual behavior
Get an empty body or zero length body
Expected behavior
Get the actual body
Code to reproduce
https://runkit.com/embed/tyzrkbthl3bs
Checklist