Add support for HTTP Exchange attachments#3331
Merged
Merged
Conversation
pratushnyi
approved these changes
May 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
This PR adds first-class support for HTTP Exchange attachments in Allure reports. Integrations can now attach one structured HTTP request/response exchange as
application/vnd.allure.http+jsonusing the.httpexchangeextension. The report renders these attachments as a compact HTTP inspector with method, URL, status, duration, headers, cookies, query parameters, trailers, bodies, and errors.The new viewer avoids unsafe HTML request/response attachments: captured content is rendered through safe text, code, table, image, and video views. HTML responses are shown as source, not executed. Redacted values stored as
__ALLURE_REDACTED__are displayed as masked placeholders, and request/response bodies can be downloaded when captured. The demo report now includes HTTP Exchange examples for JSON, form data, multipart, streaming, images, video, binary data, redirects, errors, compression, upgrades, and gRPC-style trailers.Example attachment:
{ "schemaVersion": 1, "start": 1710000186400, "stop": 1710000186487, "request": { "method": "POST", "url": "https://api.example.com/v1/orders/42?dryRun=true", "httpVersion": "HTTP/1.1", "headers": [ { "name": "authorization", "value": "__ALLURE_REDACTED__" }, { "name": "content-type", "value": "application/json" } ], "body": { "contentType": "application/json", "encoding": "utf8", "value": "{\"name\":\"demo\"}", "size": 15 } }, "response": { "status": 201, "statusText": "Created", "headers": [ { "name": "content-type", "value": "application/json" } ], "body": { "contentType": "application/json", "encoding": "utf8", "value": "{\"id\":42}", "size": 9 } } }Checklist