Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
beaf4d3
docs: adds article on working with the Fetch API
iOvergaard May 8, 2025
05c9a9a
docs: adds article on http-client
iOvergaard May 8, 2025
a129be6
docs: adds overview and main README
iOvergaard May 8, 2025
5661fcc
docs: updates code samples after testing
iOvergaard May 8, 2025
20a72e7
docs: corrects wrong variable use
iOvergaard May 8, 2025
2154db3
docs: adds an article on how to execute requests
iOvergaard May 14, 2025
bf64093
docs: adds reference to new article
iOvergaard May 14, 2025
5d7e975
docs: removes warning
iOvergaard May 14, 2025
590dfe5
docs: adds an article on generating your own custom client
iOvergaard May 14, 2025
1b2687d
docs: adds bullets to why to choose the http-client
iOvergaard May 14, 2025
dd9ce4a
docs: name the client the same
iOvergaard May 14, 2025
ae00ae6
docs: clarify what a custom client is
iOvergaard May 14, 2025
dc0ad38
docs: clarify what the umbraco http client is
iOvergaard May 14, 2025
a5177c5
docs: adds an advanced topics section
iOvergaard May 14, 2025
f90e7c7
docs: adds examples on authentication
iOvergaard May 14, 2025
1ad9cee
docs: adds extra bullet
iOvergaard May 14, 2025
0666e56
docs: align naming of http client
iOvergaard May 14, 2025
d4a4236
docs: simplify example
iOvergaard May 14, 2025
d3e6d16
docs: adds warning about error handling
iOvergaard May 14, 2025
e60bde1
docs: adds links and other helpful tips
iOvergaard May 14, 2025
fa5af18
Update 16/umbraco-cms/customizing/foundation/fetching-data/custom-gen…
iOvergaard May 14, 2025
cf56998
Update 16/umbraco-cms/customizing/foundation/fetching-data/fetch-api.md
iOvergaard May 16, 2025
c6a5c94
Apply suggestions from code review
iOvergaard May 16, 2025
95e3067
Update 16/umbraco-cms/customizing/foundation/fetching-data/README.md
eshanrnh May 16, 2025
ce084da
Update 16/umbraco-cms/customizing/foundation/fetching-data/README.md
eshanrnh May 16, 2025
efca7a4
Update 16/umbraco-cms/customizing/foundation/fetching-data/README.md
eshanrnh May 16, 2025
8478a29
Update 16/umbraco-cms/customizing/foundation/fetching-data/README.md
eshanrnh May 16, 2025
1610574
Update 16/umbraco-cms/customizing/foundation/fetching-data/README.md
eshanrnh May 16, 2025
fb99c21
Update 16/umbraco-cms/customizing/foundation/fetching-data/http-clien…
eshanrnh May 16, 2025
8e7b26a
Update 16/umbraco-cms/customizing/foundation/fetching-data/custom-gen…
eshanrnh May 16, 2025
656054a
Update 16/umbraco-cms/customizing/foundation/fetching-data/try-execut…
eshanrnh May 16, 2025
ed25570
Update 16/umbraco-cms/customizing/foundation/fetching-data/try-execut…
eshanrnh May 16, 2025
1e03647
Update 16/umbraco-cms/customizing/foundation/fetching-data/try-execut…
eshanrnh May 16, 2025
0459273
Update 16/umbraco-cms/customizing/foundation/fetching-data/README.md
eshanrnh May 16, 2025
a4d1712
Update 16/umbraco-cms/customizing/foundation/fetching-data/README.md
eshanrnh May 16, 2025
a3b17c3
Update 16/umbraco-cms/customizing/foundation/fetching-data/README.md
eshanrnh May 16, 2025
150a085
Update 16/umbraco-cms/customizing/foundation/fetching-data/custom-gen…
eshanrnh May 16, 2025
538ed00
Update 16/umbraco-cms/customizing/foundation/fetching-data/custom-gen…
eshanrnh May 16, 2025
a29574f
Update 16/umbraco-cms/customizing/foundation/fetching-data/custom-gen…
eshanrnh May 16, 2025
3fceda7
Update 16/umbraco-cms/customizing/foundation/fetching-data/custom-gen…
eshanrnh May 16, 2025
89e917f
Update 16/umbraco-cms/customizing/foundation/fetching-data/custom-gen…
eshanrnh May 16, 2025
742d345
Update 16/umbraco-cms/customizing/foundation/fetching-data/custom-gen…
eshanrnh May 16, 2025
ed1df4f
Update 16/umbraco-cms/customizing/foundation/fetching-data/custom-gen…
eshanrnh May 16, 2025
16dfc18
Update 16/umbraco-cms/customizing/foundation/fetching-data/custom-gen…
eshanrnh May 16, 2025
f957799
Update 16/umbraco-cms/customizing/foundation/fetching-data/custom-gen…
eshanrnh May 16, 2025
fcba065
Update 16/umbraco-cms/customizing/foundation/fetching-data/custom-gen…
eshanrnh May 16, 2025
5822ddd
Update 16/umbraco-cms/customizing/foundation/fetching-data/custom-gen…
eshanrnh May 16, 2025
ebae84f
Update 16/umbraco-cms/customizing/foundation/fetching-data/fetch-api.md
eshanrnh May 16, 2025
7e796c8
Update 16/umbraco-cms/customizing/foundation/fetching-data/fetch-api.md
eshanrnh May 16, 2025
e7fa87b
Update 16/umbraco-cms/customizing/foundation/fetching-data/fetch-api.md
eshanrnh May 16, 2025
97b8ac9
Update 16/umbraco-cms/customizing/foundation/fetching-data/fetch-api.md
eshanrnh May 16, 2025
c91b4f9
Update 16/umbraco-cms/customizing/foundation/fetching-data/fetch-api.md
eshanrnh May 16, 2025
ac48356
Update 16/umbraco-cms/customizing/foundation/fetching-data/fetch-api.md
eshanrnh May 16, 2025
7b4d4bf
Update 16/umbraco-cms/customizing/foundation/fetching-data/http-clien…
eshanrnh May 16, 2025
69b4b52
Update 16/umbraco-cms/customizing/foundation/fetching-data/http-clien…
eshanrnh May 16, 2025
8131140
Update 16/umbraco-cms/customizing/foundation/fetching-data/http-clien…
eshanrnh May 16, 2025
9eece0d
Update 16/umbraco-cms/customizing/foundation/fetching-data/http-clien…
eshanrnh May 16, 2025
9eefa33
Update 16/umbraco-cms/customizing/foundation/fetching-data/http-clien…
eshanrnh May 16, 2025
930d333
Update 16/umbraco-cms/customizing/foundation/fetching-data/http-clien…
eshanrnh May 16, 2025
b90ba6a
Update 16/umbraco-cms/customizing/foundation/fetching-data/http-clien…
eshanrnh May 16, 2025
545c7cd
Update 16/umbraco-cms/customizing/foundation/fetching-data/http-clien…
eshanrnh May 16, 2025
d4b5a1a
Update 16/umbraco-cms/customizing/foundation/fetching-data/http-clien…
eshanrnh May 16, 2025
3dc3c9e
Update 16/umbraco-cms/customizing/foundation/fetching-data/custom-gen…
eshanrnh May 16, 2025
d88e2d2
Update 16/umbraco-cms/customizing/foundation/fetching-data/README.md
eshanrnh May 16, 2025
682e137
Update 16/umbraco-cms/customizing/foundation/fetching-data/custom-gen…
eshanrnh May 16, 2025
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update 16/umbraco-cms/customizing/foundation/fetching-data/fetch-api.md
  • Loading branch information
eshanrnh authored May 16, 2025
commit ebae84fcbe9f12b458c584a06a832f7640eb0505
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@
}
```

{% hint style="info" %}
The example assumes that you have a controller set up at the `/umbraco/MyApiController/GetData` endpoint that returns JSON data. You can replace this with your own endpoint as needed. Read more about creating a controller in the [Controllers](../../../implementation/controllers.md) article.
{% endhint %}

{% hint style="warning" %}
When using the Fetch API, you need to manually handle errors and authentication. For most scenarios, we recommend using the Umbraco HTTP Client, which provides built-in error handling and authentication.
Expand Down Expand Up @@ -176,4 +173,4 @@

The Fetch API is a powerful and flexible way to make network requests in JavaScript. It is available in all modern browsers and is the recommended way to make network requests in JavaScript. The Fetch API can be used in Umbraco to make network requests to the server. It can also be used to make requests to the Management API controllers. You can use the Fetch API to make requests to any endpoint in the Management API. You can also use it to handle responses in a variety of formats. This is especially useful, if you have but a few requests to make.

However, if you have a lot of requests to make, you might want to consider an alternative approach. You could use a library like [@hey-api/openapi-ts](https://heyapi.dev/openapi-ts/get-started) to generate a TypeScript client. The library requires an OpenAPI definition and allows you to make requests to the Management API without having to manually write the requests yourself. The generated client will only need the token once. This can save you a lot of time and effort when working with the Management API. The Umbraco Backoffice itself is running with this library and even exports its internal HTTP client. You can read more about this in the [HTTP Client](http-client.md) article.

Check warning on line 176 in 16/umbraco-cms/customizing/foundation/fetching-data/fetch-api.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [UmbracoDocs.Names] We prefer TypeScript over 'ts' Raw Output: {"message": "[UmbracoDocs.Names] We prefer TypeScript over 'ts'", "location": {"path": "16/umbraco-cms/customizing/foundation/fetching-data/fetch-api.md", "range": {"start": {"line": 176, "column": 148}}}, "severity": "WARNING"}
Loading