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
+2-57Lines changed: 2 additions & 57 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -121,6 +121,8 @@ export async function POST(req: Request) {
121
121
}
122
122
```
123
123
124
+
## Advanced Usage
125
+
124
126
## Handling errors
125
127
126
128
When the library is unable to connect to the API,
@@ -197,8 +199,6 @@ On timeout, an `APIConnectionTimeoutError` is thrown.
197
199
198
200
Note that requests which time out will be [retried twice by default](#retries).
199
201
200
-
## Advanced Usage
201
-
202
202
### Accessing raw Response data (e.g., headers)
203
203
204
204
The "raw" `Response` returned by `fetch()` can be accessed through the `.asResponse()` method on the `APIPromise` type that all methods return.
@@ -277,49 +277,6 @@ const client = new BrowserUse({
277
277
});
278
278
```
279
279
280
-
### Making custom/undocumented requests
281
-
282
-
This library is typed for convenient access to the documented API. If you need to access undocumented
283
-
endpoints, params, or response properties, the library can still be used.
284
-
285
-
#### Undocumented endpoints
286
-
287
-
To make requests to undocumented endpoints, you can use `client.get`, `client.post`, and other HTTP verbs.
288
-
Options on the client, such as retries, will be respected when making these requests.
289
-
290
-
```ts
291
-
awaitclient.post('/some/path', {
292
-
body: { some_prop: 'foo' },
293
-
query: { some_query_arg: 'bar' },
294
-
});
295
-
```
296
-
297
-
#### Undocumented request params
298
-
299
-
To make requests using undocumented parameters, you may use `// @ts-expect-error` on the undocumented
300
-
parameter. This library doesn't validate at runtime that the request matches the type, so any extra values you
301
-
send will be sent as-is.
302
-
303
-
```ts
304
-
client.tasks.create({
305
-
// ...
306
-
// @ts-expect-error baz is not yet public
307
-
baz: 'undocumented option',
308
-
});
309
-
```
310
-
311
-
For requests with the `GET` verb, any extra params will be in the query, all other requests will send the
312
-
extra param in the body.
313
-
314
-
If you want to explicitly send an extra argument, you can do so with the `query`, `body`, and `headers` request
315
-
options.
316
-
317
-
#### Undocumented response properties
318
-
319
-
To access undocumented response properties, you may access the response object with `// @ts-expect-error` on
320
-
the response object, or cast the response object to the requisite type. Like the request params, we do not
321
-
validate or strip extra properties from the response from the API.
322
-
323
280
### Customizing the fetch client
324
281
325
282
By default, this library expects a global `fetch` function is defined.
@@ -401,18 +358,6 @@ const client = new BrowserUse({
401
358
402
359
## Frequently Asked Questions
403
360
404
-
## Semantic versioning
405
-
406
-
This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:
407
-
408
-
1. Changes that only affect static types, without breaking runtime behavior.
409
-
2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_
410
-
3. Changes that we do not expect to impact the vast majority of users in practice.
411
-
412
-
We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
413
-
414
-
We are keen for your feedback; please open an [issue](https://www.github.com/browser-use/browser-use-node/issues) with questions, bugs, or suggestions.
0 commit comments