@faasjs/request 0.0.4-beta.10 → 0.0.4-beta.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +10 -6
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -12,6 +12,10 @@ FaasJS's request module.
12
12
 
13
13
  ## Modules
14
14
 
15
+ ### Classes
16
+
17
+ - [ResponseError](classes/ResponseError.md)
18
+
15
19
  ### Type Aliases
16
20
 
17
21
  - [Request](#request)
@@ -34,7 +38,7 @@ FaasJS's request module.
34
38
 
35
39
  | Name | Type |
36
40
  | :------ | :------ |
37
- | `body?` | { `[key: string]`: `any`; } |
41
+ | `body?` | \{ `[key: string]`: `any`; } |
38
42
  | `headers?` | `http.OutgoingHttpHeaders` |
39
43
  | `host?` | `string` |
40
44
  | `method?` | `string` |
@@ -53,7 +57,7 @@ ___
53
57
  | :------ | :------ | :------ |
54
58
  | `agent?` | `boolean` | - |
55
59
  | `auth?` | `string` | The authentication credentials to use for the request. Format: `username:password` |
56
- | `body?` | { `[key: string]`: `any`; } \| `string` | - |
60
+ | `body?` | \{ `[key: string]`: `any`; } \| `string` | - |
57
61
  | `downloadFile?` | `string` | Path of downloading a file from the server. ```ts await request('https://example.com', { downloadFile: 'filepath' }) ``` |
58
62
  | `downloadStream?` | `NodeJS.WritableStream` | Create a write stream to download a file. ```ts import { createWriteStream } from 'fs' const stream = createWriteStream('filepath') await request('https://example.com', { downloadStream: stream }) ``` |
59
63
  | `file?` | `string` | Path of uploading a file to the server. ```ts await request('https://example.com', { file: 'filepath' }) ``` |
@@ -63,14 +67,14 @@ ___
63
67
  | `parse?` | (`body`: `string`) => `any` | Body parser. Defaults to `JSON.parse`. |
64
68
  | `passphrase?` | `string` | - |
65
69
  | `pfx?` | `Buffer` | - |
66
- | `query?` | { `[key: string]`: `any`; } | - |
70
+ | `query?` | \{ `[key: string]`: `any`; } | - |
67
71
  | `timeout?` | `number` | - |
68
72
 
69
73
  ___
70
74
 
71
75
  ### Response
72
76
 
73
- Ƭ **Response**<`T`\>: `Object`
77
+ Ƭ **Response**\<`T`\>: `Object`
74
78
 
75
79
  #### Type parameters
76
80
 
@@ -108,7 +112,7 @@ ___
108
112
 
109
113
  ### request
110
114
 
111
- ▸ **request**<`T`\>(`url`, `options?`): `Promise`<[`Response`](#response)<`T`\>\>
115
+ ▸ **request**\<`T`\>(`url`, `options?`): `Promise`\<[`Response`](#response)\<`T`\>\>
112
116
 
113
117
  Request
114
118
 
@@ -127,7 +131,7 @@ Request
127
131
 
128
132
  #### Returns
129
133
 
130
- `Promise`<[`Response`](#response)<`T`\>\>
134
+ `Promise`\<[`Response`](#response)\<`T`\>\>
131
135
 
132
136
  **`Url`**
133
137
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faasjs/request",
3
- "version": "0.0.4-beta.10",
3
+ "version": "0.0.4-beta.12",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -21,10 +21,10 @@
21
21
  "dist"
22
22
  ],
23
23
  "peerDependencies": {
24
- "@faasjs/logger": "0.0.4-beta.10"
24
+ "@faasjs/logger": "0.0.4-beta.12"
25
25
  },
26
26
  "devDependencies": {
27
- "@faasjs/logger": "0.0.4-beta.10"
27
+ "@faasjs/logger": "0.0.4-beta.12"
28
28
  },
29
29
  "engines": {
30
30
  "npm": ">=9.0.0",