@ctrl/deluge
Advanced tools
@@ -155,6 +155,15 @@ "use strict"; | ||
const url = url_join_1.default(this.config.baseUrl, '/upload'); | ||
const res = await got_1.default.post(url, { | ||
const options = { | ||
headers: form.getHeaders(), | ||
body: form, | ||
}); | ||
retry: 0, | ||
}; | ||
// allow proxy agent | ||
if (this.config.agent) { | ||
options.agent = this.config.agent; | ||
} | ||
if (this.config.timeout) { | ||
options.timeout = this.config.timeout; | ||
} | ||
const res = await got_1.default.post(url, options); | ||
return JSON.parse(res.body); | ||
@@ -161,0 +170,0 @@ } |
{ | ||
"name": "@ctrl/deluge", | ||
"version": "1.7.0", | ||
"version": "1.7.1", | ||
"description": "TypeScript api wrapper for deluge using got", | ||
@@ -41,3 +41,3 @@ "author": "Scott Cooper <scttcper@gmail.com>", | ||
"@types/jest": "24.0.13", | ||
"@types/node": "12.0.2", | ||
"@types/node": "12.0.4", | ||
"@types/tough-cookie": "2.3.5", | ||
@@ -59,3 +59,3 @@ "@types/url-join": "4.0.0", | ||
"typedoc": "0.14.2", | ||
"typescript": "3.4.5" | ||
"typescript": "3.5.1" | ||
}, | ||
@@ -62,0 +62,0 @@ "publishConfig": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
78687
1.05%1065
0.85%