Skip to content

Commit 1b2687d

Browse files
committed
docs: adds bullets to why to choose the http-client
1 parent 590dfe5 commit 1b2687d

File tree

1 file changed

+9
-1
lines changed
  • 16/umbraco-cms/customizing/foundation/fetching-data

1 file changed

+9
-1
lines changed

16/umbraco-cms/customizing/foundation/fetching-data/README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,15 @@ description: Learn how to request data when extending the Backoffice.
88

99
There are two main ways to fetch data through HTTP in the Umbraco Backoffice: using the Fetch API or the Umbraco HTTP client. The Fetch API is a modern way to make network requests in JavaScript, while the Umbraco HTTP client is a wrapper around the Fetch API. That provides a more convenient way to make network requests.
1010

11-
For most scenarios, we recommend using the Umbraco HTTP client provided by Umbraco. The Fetch API is an alternative for simpler use cases. Here is a quick overview of the two options for you to compare:
11+
For most scenarios, we recommend using the Umbraco HTTP Client because it:
12+
13+
- Automatically handles authentication and error handling.
14+
- Provides type safety for requests and responses.
15+
- Simplifies request and response parsing.
16+
17+
The Fetch API is an alternative for simpler use cases.
18+
19+
Here is a quick overview of the two options for you to compare:
1220

1321
| Feature | [Fetch API](fetch-api.md) | [Umbraco HTTP Client](http-client.md) |
1422
|------------------------|-------------------------------|------------------------------|

0 commit comments

Comments
 (0)