Skip to content

Add headers to fetchAlbum HTTP request#13185

Open
IvoneDjaja wants to merge 2 commits intoflutter:mainfrom
IvoneDjaja:patch-1
Open

Add headers to fetchAlbum HTTP request#13185
IvoneDjaja wants to merge 2 commits intoflutter:mainfrom
IvoneDjaja:patch-1

Conversation

@IvoneDjaja
Copy link

Add Accept header and Content-Type header to fix fetchAlbum returning 403 on mobile.

Fix: #13184

PRs or commits this PR depends on (if any):

Presubmit checklist

  • If you are unwilling, or unable, to sign the CLA, even for a tiny, one-word PR, please file an issue instead of a PR.
  • If this PR is not meant to land until a future stable release, mark it as draft with an explanation.
  • This PR follows the Google Developer Documentation Style Guidelines—for example, it doesn't use i.e. or e.g., and it avoids I and we (first-person pronouns).
  • This PR uses semantic line breaks
    of 80 characters or fewer.

@IvoneDjaja IvoneDjaja requested review from a team and sfshaza2 as code owners March 15, 2026 12:05
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This PR aims to fix an issue by adding headers to an HTTP request in a code example. However, the change is made directly in a markdown file that appears to be generated from a source file, so the change might be lost. I've left a comment pointing to the correct file to modify. I also provided feedback on the headers themselves, suggesting to only include the Accept header for a GET request, as Content-Type is redundant.

@parlough
Copy link
Member

/gcbrun

@flutter-website-bot
Copy link
Collaborator

Visit the preview URL for this PR (updated for commit 439bab7):

https://flutter-docs-prod--pr13185-patch-1-8ywc23a5.web.app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

https://jsonplaceholder.typicode.com/albums/1 returning 403 on android

3 participants