We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1b6bcf9 commit 5c86e1cCopy full SHA for 5c86e1c
README.md
@@ -0,0 +1,35 @@
1
+
2
+# typescript-http-client
3
4
+## Install
5
6
+```bash
7
+npm i https://github.com/tikiram/typescript-http-client.git
8
+```
9
10
11
+yarn add typescript-http-client@https://github.com/tikiram/typescript-http-client.git
12
13
14
+## Example
15
16
+```js
17
+import {
18
+ ErrorHandlerMiddleware,
19
+ HTTPClient,
20
+ HTTPMethod,
21
+ LoggerMiddleware,
22
+} from 'typescript-http-client';
23
24
+async function something() {
25
+ const client = new HTTPClient(
26
+ 'https://pokeapi.co/api/v2',
27
+ [new LoggerMiddleware(), new ErrorHandlerMiddleware()]
28
+ );
29
30
+ const response = await client.request<Pokemon>(HTTPMethod.Get, '/pokemon/ditto');
31
32
+ console.log(response)
33
+}
34
35
0 commit comments