Skip to content

Conversation

iOvergaard
Copy link
Contributor

Description

Documents Fetch and http-client in the Backoffice

Type of suggestion

  • Typo/grammar fix
  • Updated outdated content
  • New content
  • Updates related to a new version
  • Other

Product & version (if relevant)

16.0.0

Deadline (if relevant)

ASAP

@iOvergaard iOvergaard requested a review from Copilot May 8, 2025 14:56
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces new documentation for fetching data in the Backoffice, covering both the HTTP Client wrapper and the native Fetch API.

  • Adds a new HTTP Client guide with code examples on GET requests, error handling via tryExecute, and request cancellation.
  • Provides a Fetch API guide with usage examples including authentication and error handling.
  • Updates the documentation overview (README and SUMMARY) to reflect these new guides.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
16/umbraco-cms/customizing/foundation/fetching-data/http-client.md New guide on using the Backoffice HTTP Client including cancellation support and tryExecute usage.
16/umbraco-cms/customizing/foundation/fetching-data/fetch-api.md New guide that demonstrates using the Fetch API with authentication and tryExecute for the Management API.
16/umbraco-cms/customizing/foundation/fetching-data/README.md Overview page linking the new Fetch API and HTTP Client guides.
16/umbraco-cms/SUMMARY.md Summary updated to include the new Fetching Data documentation topics.
Comments suppressed due to low confidence (2)

16/umbraco-cms/customizing/foundation/fetching-data/http-client.md:64

  • The variable 'request' is not defined before being used with tryExecute. Please define 'request' (for example, by assigning the result of umbHttpClient.get({...})) to ensure the code sample works as intended.
tryExecute(this, request, { 

16/umbraco-cms/customizing/foundation/fetching-data/fetch-api.md:124

  • The error variable is not defined in this context; please use response.error in the console.error statement to correctly reference the error returned by tryExecute.
console.error('There was a problem with the fetch operation:', error); 
@iOvergaard iOvergaard marked this pull request as ready for review May 14, 2025 11:26
@iOvergaard iOvergaard requested a review from Copilot May 14, 2025 11:27
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds new documentation for fetching data in the Backoffice by introducing guides on the Fetch API, the Umbraco HTTP Client, the tryExecute function, and generating a custom HTTP client using @hey-api/openapi-ts.

  • Introduces a new "Fetching Data" section with detailed examples and explanations.
  • Updates the SUMMARY to include the new sections and links to relevant documentation.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
16/umbraco-cms/customizing/foundation/working-with-data/README.md Removed a deprecated warning hint to streamline the content.
16/umbraco-cms/customizing/foundation/fetching-data/try-execute.md Adds a comprehensive guide to executing requests with error handling and cancellation.
16/umbraco-cms/customizing/foundation/fetching-data/http-client.md Provides documentation on using the Umbraco HTTP Client with code examples.
16/umbraco-cms/customizing/foundation/fetching-data/fetch-api.md New documentation detailing the Fetch API usage including authentication examples.
16/umbraco-cms/customizing/foundation/fetching-data/custom-generated-client.md Introduces instructions on generating a custom client using @hey-api/openapi-ts.
16/umbraco-cms/customizing/foundation/fetching-data/README.md Offers an overview of the methods available to fetch data in the Backoffice.
16/umbraco-cms/SUMMARY.md Updates the SUMMARY file to incorporate the new "Fetching Data" section and its subsections.
…erated-client.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Member

@leekelleher leekelleher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From a technical perspective, I'm happy with the Fetch docs. Great work! 🚀

Co-authored-by: Lee Kelleher <leekelleher@users.noreply.github.com>
eshanrnh added 16 commits May 16, 2025 10:22
@eshanrnh eshanrnh merged commit f7babb4 into main May 16, 2025
25 of 26 checks passed
@sofietoft sofietoft deleted the v16/docs/http-client branch May 16, 2025 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants