Skip to content

Add blog post: http_request API modernization#108

Open
bdraco wants to merge 2 commits intomainfrom
blog/2026-03-12-http-request-api-modernization
Open

Add blog post: http_request API modernization#108
bdraco wants to merge 2 commits intomainfrom
blog/2026-03-12-http-request-api-modernization

Conversation

@bdraco
Copy link
Member

@bdraco bdraco commented Mar 12, 2026

Summary

  • Documents migration from std::map/std::list/std::set to std::vector for http_request headers
  • get_response_headers() removed, use get_response_header(name) instead
  • Deprecated overloads provided until 2027.1.0

@netlify
Copy link

netlify bot commented Mar 12, 2026

Deploy Preview for esphome-dev-docs ready!

Name Link
🔨 Latest commit 4e6f411
🔍 Latest deploy log https://app.netlify.com/projects/esphome-dev-docs/deploys/69b239f4734f090008269c31
😎 Deploy Preview https://deploy-preview-108--esphome-dev-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@bdraco bdraco marked this pull request as ready for review March 12, 2026 03:41
Copilot AI review requested due to automatic review settings March 12, 2026 03:41
Copy link
Contributor

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

Adds a documentation blog post describing the breaking C++ http_request API changes in ESPHome 2026.3.0+, focusing on the migration of header container types to std::vector and the replacement of get_response_headers() with get_response_header(name).

Changes:

  • New blog post documenting the request/response header API modernization and deprecation timeline.
  • Adds a migration guide with code examples and version-guard patterns for external components.
  • Provides “finding code that needs updates” grep commands and links to the underlying PRs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

grep -rn 'get_response_headers' your_component/

# Find std::set for collect_headers
grep -rn 'std::set.*collect\|collect_headers' your_component/
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

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

The grep pattern uses \| alternation, which is a non-POSIX BRE extension and may not work consistently across environments. To keep these commands broadly copy/pasteable, consider either running two separate grep commands or switching to grep -E and using | alternation.

Suggested change
grep -rn 'std::set.*collect\|collect_headers' your_component/
grep -rnE 'std::set.*collect|collect_headers' your_component/

Copilot uses AI. Check for mistakes.
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.

2 participants