Skip to content
This repository was archived by the owner on Jun 15, 2026. It is now read-only.

Feature/display request headers#34

Open
edward232232 wants to merge 9 commits into
Azure-Samples:mainfrom
edward232232:feature/display-request-headers
Open

Feature/display request headers#34
edward232232 wants to merge 9 commits into
Azure-Samples:mainfrom
edward232232:feature/display-request-headers

Conversation

@edward232232

Copy link
Copy Markdown

Purpose

Adds HTTP request headers display to the Event Grid viewer for debugging and troubleshooting purposes

Does this introduce a breaking change?

[ ] Yes
[x] No

Pull Request Type

What kind of change does this Pull Request introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test

  1. git clone https://github.com/edward232232/azure-event-grid-viewer.git
  2. cd azure-event-grid-viewer
  3. git checkout feature/display-request-headers
  4. dotnet restore
  5. dotnet build
  6. dotnet run --
  • Test the code
  1. Navigate to http://localhost:5000 in browser
  2. Send a POST request with custom headers to test headers display
  3. curl -X POST http://localhost:5000/api/updates
    -H "Content-Type: application/json"
    -H "Authorization: Bearer test-token"
    -H "Custom-Header: test-value"
    -d '[{"id":"test-id","eventType":"test.event","subject":"test","eventTime":"2025-01-01T00:00:00Z","data":{"test":"data"}}]'
  4. Check that headers appear in the UI below the event data

What to Check

Verify that the following are valid
Headers are displayed below event data in the UI
Headers section only appears when headers are present
All existing Event Grid viewer functionality works unchanged
Headers display for validation, grid events, and cloud events
Headers are formatted as readable JSON
image

Other Information

eddiek added 9 commits July 25, 2025 13:53
- Enhanced Event Grid Viewer to show HTTP request headers alongside event data
- Added tabbed interface to switch between event data and headers
- Created header count badge for quick reference
- Filtered headers to show only relevant Event Grid and HTTP headers
- Added test script to verify functionality
- Maintained backward compatibility with existing functionality

Features:
- View aeg-* headers (event-type, data-version, metadata-version, etc.)
- Display common HTTP headers (content-type, user-agent, etc.)
- Clean JSON formatting for headers display
- Improved UI with Bootstrap tabs
- Removed complex tabs and extra table column
- Headers now display below event data in simple format
- Maintains original table structure and UI layout
- Only shows headers when they exist
- Minimal code changes from original repository
- Removed unused EventWithHeaders model

Changes:
- UpdatesController.cs: Added header capture and forwarding
- Index.cshtml: Simple headers display below event data
- Only 2 files modified from original repo
- Add GetRequestHeaders() method to capture all HTTP headers
- Display headers in collapsible sections below event data
- Minimal changes to core functionality for debugging
- Add GetRequestHeaders() method to capture HTTP headers
- Display headers in UI below event data for debugging
- Only essential changes for the core feature
Clean implementation with minimal diff:
- Only core files modified for headers display feature
- 37 additions, 7 deletions across 2 files
@edward232232

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree
@microsoft-github-policy-service agree company="Microsoft"

@edward232232

Copy link
Copy Markdown
Author

@dbarkol any chance you could look into this PR?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant