Skip to content

Add support for HTTP Exchange attachments#3331

Merged
baev merged 1 commit into
mainfrom
http-exchange-attach
May 11, 2026
Merged

Add support for HTTP Exchange attachments#3331
baev merged 1 commit into
mainfrom
http-exchange-attach

Conversation

@baev
Copy link
Copy Markdown
Member

@baev baev commented May 8, 2026

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+json using the .httpexchange extension. 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

@baev baev added the type:new feature Change that add something new for end users label May 8, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

Allure Report Summary

Name Duration Stats New Flaky Retry Report
Allure 2 – Pull request #3331 9m 59s Passed tests 372   Skipped tests 1 23 0 0 View

@baev baev changed the title Add http exchange attachment Add support for HTTP Exchange attachments May 8, 2026
@baev baev merged commit 3e7dde9 into main May 11, 2026
21 of 22 checks passed
@baev baev deleted the http-exchange-attach branch May 11, 2026 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants