Skip to content

Commit bf64093

Browse files
committed
docs: adds reference to new article
1 parent 2154db3 commit bf64093

File tree

1 file changed

+27
-3
lines changed
  • 16/umbraco-cms/customizing/foundation/fetching-data

1 file changed

+27
-3
lines changed
Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,39 @@
1+
---
2+
description: Learn how to request data when extending the Backoffice.
3+
---
4+
15
# Fetching Data
26

3-
Learn how to request data when extending the Backoffice.
7+
## Fetch Data Through HTTP
8+
9+
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.
10+
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:
12+
13+
| Feature | [Fetch API](fetch-api.md) | [Umbraco HTTP Client](http-client.md) |
14+
|------------------------|-------------------------------|------------------------------|
15+
| Authentication | Manual | Automatic |
16+
| Error Handling | Manual | Built-in |
17+
| Type Safety | No | Yes |
18+
| Request Cancellation | Yes (via AbortController) | Yes (via AbortController) |
19+
| Recommended Use Case | Standard requests | Complex or frequent requests|
420

5-
## [Fetch API](fetch-api.md)
21+
Once you have decided which option to use, you can read more about how to use it below. After that, you can read about how to work with the data you receive from the server.
22+
23+
### [Fetch API](fetch-api.md)
624

725
The Fetch API is a modern way to make network requests in JavaScript. It provides a more powerful and flexible feature set than the older XMLHttpRequest.
826

9-
## [HTTP Client](http-client.md)
27+
### [HTTP Client](http-client.md)
1028

1129
The HTTP Client is a wrapper around the Fetch API that provides a more convenient way to make network requests. It handles things like request and response parsing, error handling, and retries.
1230

31+
## Handle Requests
32+
33+
### [Executing Requests](try-execute.md)
34+
35+
Executing the request is the next step after fetching data. You can use the `tryExecute` function to handle errors and refresh the token if it is expired.
36+
1337
## [Working with Data](../working-with-data/README.md)
1438

1539
Once you have the data using one of the methods above, you can read more about how to work with it here.

0 commit comments

Comments
 (0)