Skip to content

Commit af32603

Browse files
committed
Update README after Evan's suggestion
1 parent a4c3266 commit af32603

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -396,18 +396,17 @@ This API is used internally and is not directly supported.
396396

397397
#### Inspecting the Request
398398

399-
It is possible to inspect a request before it is sent. All of the client methods return an instance of `SeamHttpRequest` which has `url`, `method` and `body` properties. The request is only sent to the server when the `SeamHttpRequest` is awaited.
399+
All client methods return an instance of `SeamHttpRequest`.
400+
Inspect the request before it is sent to the server by intentionally not awaiting the `SeamHttpRequest`;
400401

401402
```ts
402403
const seam = new SeamHttp('your-api-key')
403404

404405
const request = seam.devices.list()
405406

406-
console.log('Sending request', request.url, request.method, request.body)
407+
console.log(`${request.method} ${request.url}`, JSON.stringify(request.body))
407408

408-
const devices = await request // or `await request.execute()` if you prefer
409-
410-
console.log(devices)
409+
const devices = await request.execute()
411410
```
412411

413412
## Development and Testing

0 commit comments

Comments
 (0)