You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| connections |`50`|`number`| no | See [connections](#connections)|
45
-
| fallback |`undefined`|`function`| no | Function to call when requests fail |
46
-
| keepAliveMaxTimeout |`undefined`|`number`| no | See [keepAliveMaxTimeout](#keepAliveMaxTimeout)|
47
-
| keepAliveTimeout |`undefined`|`number`| no | See [keepAliveTimeout](#keepAliveTimeout)|
48
-
| logger |`undefined `|`object`| no | A logger which conform to a log4j interface |
49
-
| pipelining |`10`|`number`| no | See [pipelining](#pipelining)|
50
-
| reset |`2000`|`number`| no | Circuit breaker: How long, in milliseconds, to wait before a tripped circuit should be reset. |
51
-
| threshold |`25`|`number`| no | Circuit breaker: How many, in %, requests should error before the circuit should trip. Ex; when 25% of requests fail, trip the circuit. |
52
-
| throwOn400 |`false`|`boolean`| no | If the client should throw on HTTP 400 errors.If true, HTTP 400 errors will counts against tripping the circuit. |
53
-
| throwOn500 |`true`|`boolean`| no | If the client should throw on HTTP 500 errors.If true, HTTP 500 errors will counts against tripping the circuit. |
54
-
| timeout |`500`|`number`| no | Circuit breaker: How long, in milliseconds, a request can maximum take. Requests exceeding this limit counts against tripping the circuit. |
| abortController |`undefined`|`object`| no | See [abortController](#abortController)|
45
+
| connections |`50`|`number`| no | See [connections](#connections)|
46
+
| fallback |`undefined`|`function`| no | Function to call when requests fail |
47
+
| keepAliveMaxTimeout |`undefined`|`number`| no | See [keepAliveMaxTimeout](#keepAliveMaxTimeout)|
48
+
| keepAliveTimeout |`undefined`|`number`| no | See [keepAliveTimeout](#keepAliveTimeout)|
49
+
| logger |`undefined `|`object`| no | A logger which conform to a log4j interface |
50
+
| pipelining |`10`|`number`| no | See [pipelining](#pipelining)|
51
+
| reset |`2000`|`number`| no | Circuit breaker: How long, in milliseconds, to wait before a tripped circuit should be reset. |
52
+
| threshold |`25`|`number`| no | Circuit breaker: How many, in %, requests should error before the circuit should trip. Ex; when 25% of requests fail, trip the circuit. |
53
+
| throwOn400 |`false`|`boolean`| no | If the client should throw on HTTP 400 errors.If true, HTTP 400 errors will counts against tripping the circuit. |
54
+
| throwOn500 |`true`|`boolean`| no | If the client should throw on HTTP 500 errors.If true, HTTP 500 errors will counts against tripping the circuit. |
55
+
| timeout |`500`|`number`| no | Circuit breaker: How long, in milliseconds, a request can maximum take. Requests exceeding this limit counts against tripping the circuit. |
56
+
57
+
58
+
##### abortController
59
+
60
+
Passing in an [AbortController](https://nodejs.org/docs/latest/api/globals.html#globals_class_abortcontroller) enables aborting requests.
56
61
57
62
##### connections
63
+
58
64
Property is sent to the underlying http library.
59
65
See library docs on [connections](https://undici.nodejs.org/#/docs/api/Pool?id=parameter-pooloptions)
60
66
@@ -120,7 +126,29 @@ If the client should throw on http 500 errors. If true, http 500 errors will cou
120
126
121
127
## Methods
122
128
129
+
### async request(options = {})
130
+
131
+
Sends a request using the passed in options object.
0 commit comments