Merge pull request #15 from auguwu/patch-2

Create testing area
This commit is contained in:
2019-04-24 00:20:47 +02:00
committed by GitHub
2 changed files with 15 additions and 1 deletions

View File

@@ -0,0 +1,14 @@
import w from '../index';
interface Yeetus
{
yes: boolean;
}
(async() => {
const res = await w('https://myurl.org', { method: 'GET' }).send();
const res1 = await w('https://myurl.org', { method: 'GET', chaining: false });
const d = res.json<Yeetus>();
const d1 = res.json();
})();

2
index.d.ts vendored
View File

@@ -103,7 +103,7 @@ declare namespace w {
method: URLMethods;
data?: NormalObject;
headers?: KVObject;
chain?: boolean;
chaining?: boolean;
parse?: 'json' | 'buffer' | 'form';
}
}