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
Copy file name to clipboardExpand all lines: README.md
+98Lines changed: 98 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -126,6 +126,104 @@ return value of `next` is `null`, then there are no more pages to be fetched.
126
126
Here's an example of one such pagination call:
127
127
<!-- End Pagination -->
128
128
129
+
130
+
131
+
<!-- Start Error Handling -->
132
+
# Error Handling
133
+
134
+
Handling errors in your SDK should largely match your expectations. All operations return a response object or throw an error. If Error objects are specified in your OpenAPI Spec, the SDK will throw the appropriate Error type.
135
+
136
+
137
+
<!-- End Error Handling -->
138
+
139
+
140
+
141
+
<!-- Start Server Selection -->
142
+
# Server Selection
143
+
144
+
## Select Server by Name
145
+
146
+
You can override the default server globally by passing a server name to the `server: string` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the names associated with the available servers:
The default server can also be overridden globally by passing a URL to the `serverURL: str` optional parameter when initializing the SDK client instance. For example:
The Typescript SDK makes API calls using the (axios)[https://axios-http.com/docs/intro] HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with a custom `AxiosInstance` object.
208
+
209
+
210
+
For example, you could specify a header for every request that your sdk makes as follows:
211
+
212
+
```typescript
213
+
from @speakeasy-api/speakeasy-client-sdk-typescriptimportSpeakeasy;
0 commit comments