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
***client:** document proxy use + clean up old code ([#57](https://github.com/stainless-api/builds-node-api/issues/57)) ([18f95e7](https://github.com/stainless-api/builds-node-api/commit/18f95e7c13d5920a88aee790477824c66989cc05))
***internal:** codegen related update ([#54](https://github.com/stainless-api/builds-node-api/issues/54)) ([a0504f2](https://github.com/stainless-api/builds-node-api/commit/a0504f2230fb783e10b1443645f5d26fdde13987))
21
+
***internal:** minor restructuring ([#59](https://github.com/stainless-api/builds-node-api/issues/59)) ([a03e6ca](https://github.com/stainless-api/builds-node-api/commit/a03e6ca28992147f6aac63493ec28f3f99ac6e33))
22
+
3
23
## 0.1.0-alpha.15 (2025-01-17)
4
24
5
25
Full Changelog: [v0.1.0-alpha.14...v0.1.0-alpha.15](https://github.com/stainless-api/builds-node-api/compare/v0.1.0-alpha.14...v0.1.0-alpha.15)
Copy file name to clipboardExpand all lines: README.md
+47-15Lines changed: 47 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -250,30 +250,62 @@ const client = new Stainless({
250
250
Note that if given a `STAINLESS_LOG=debug` environment variable, this library will log all requests and responses automatically.
251
251
This is intended for debugging purposes only and may change in the future without notice.
252
252
253
-
### Configuring an HTTP(S) Agent (e.g., for proxies)
253
+
### Fetch options
254
254
255
-
By default, this library uses a stable agent for all http/https requests to reuse TCP connections, eliminating many TCP & TLS handshakes and shaving around 100ms off most requests.
255
+
If you want to set custom `fetch` options without overriding the `fetch` function, you can provide a `fetchOptions` object when instantiating the client or making a request. (Request-specific options override client options.)
256
256
257
-
If you would like to disable or customize this behavior, for example to use the API behind a proxy, you can pass an `httpAgent` which is used for all requests (be they http or https), for example:
257
+
```ts
258
+
importStainlessfrom'stainless';
259
+
260
+
const client =newStainless({
261
+
fetchOptions: {
262
+
// `RequestInit` options
263
+
},
264
+
});
265
+
```
266
+
267
+
#### Configuring proxies
268
+
269
+
To modify proxy behavior, you can provide custom `fetchOptions` that add runtime-specific proxy
0 commit comments