Skip to content

Commit 4e5a0c5

Browse files
committed
Documentation for .HoistResponse()
1 parent 027672b commit 4e5a0c5

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

+16
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,22 @@ else {
246246

247247
Easy peasy! **Happy crypto shopping!** :tada:
248248

249+
Advanced Usage
250+
--------------
251+
In some advanced cases it may be desirable to gain access to the underlying `HttpResponseMessage` object to check **HTTP status codes**, **HTTP headers** or to manually inspect the **response body**. The `.HoistResponse()` method on `CoinbaseClient` can be used to gain access the underlying `HttpResponseMessage`. The following code demonstrates how get the underlying `HttpResponseMessage`:
252+
253+
```csharp
254+
var accountList = await client
255+
.AllowAnyHttpStatus()
256+
.HoistResponse(out var responseGetter)
257+
.Accounts
258+
.ListAccountsAsync();
259+
260+
var response = responseGetter();
261+
262+
var httpStatusCode = response.StatusCode;
263+
```
264+
249265

250266
Reference
251267
---------

0 commit comments

Comments
 (0)