fix: got encoding
This commit is contained in:
parent
449cd6bf37
commit
59bb15e761
|
|
@ -75,6 +75,9 @@ const custom = got.extend({
|
|||
if (options.data) {
|
||||
options.body = options.body || options.data;
|
||||
}
|
||||
if (options.responseType === 'buffer') {
|
||||
options.encoding = null;
|
||||
}
|
||||
if (options.params) {
|
||||
options.query = options.query || queryString.stringify(options.params);
|
||||
options.searchParams = options.query; // for Got v11 after
|
||||
|
|
|
|||
Loading…
Reference in New Issue