Skip to content
Allure report logoAllure Report
Main Navigation ModulesDocumentationStarter Project

English

Español

English

Español

Appearance

Sidebar Navigation

Allure 3

Install & Upgrade

Install Allure

Upgrade Allure

Configure

Create Reports

How to generate a report

How to view a report

Improving readability of your test reports

Improving navigation in your test report

Reading Allure charts

Migrate from Allure 2

Allure 2

Install & Upgrade

Install for Windows

Install for macOS

Install for Linux

Install for Node.js

Upgrade Allure

Create Reports

How to generate a report

How to view a report

Improving readability of your test reports

Improving navigation in your test report

Features

Test steps

Attachments

Test statuses

Assertion diffs

Sorting and filtering

Environments

Multistage Builds

Categories

Visual analytics

Test stability analysis

History and retries

Quality Gate

Global Errors and Attachments

Timeline

Export to CSV

Export metrics

Guides

JUnit 5 parametrization

JUnit 5 & Selenide: screenshots and attachments

JUnit 5 & Selenium: screenshots and attachments

Setting up JUnit 5 with GitHub Actions

Pytest parameterization

Pytest & Selenium: screenshots and attachments

Pytest & Playwright: screenshots and attachments

Pytest & Playwright: videos

Playwright parameterization

Publishing Reports to GitHub Pages

Allure Report 3: XCResults Reader

How it works

Overview

Glossary

Test result file

Container file

Categories file

Environment file

Executor file

History files

Test Identifiers

Integrations

Azure DevOps

Bamboo

GitHub Action

Jenkins

JetBrains IDEs

TeamCity

Visual Studio Code

Frameworks

Axios

Getting started

Configuration

Reference

Behat

Getting started

Configuration

Reference

Behave

Getting started

Configuration

Reference

Bun

Getting started

Configuration

Reference

Chai

Getting started

Reference

Codeception

Getting started

Configuration

Reference

CodeceptJS

Getting started

Configuration

Reference

Cucumber.js

Getting started

Configuration

Reference

Cucumber-JVM

Getting started

Configuration

Reference

Cucumber.rb

Getting started

Configuration

Reference

Cypress

Getting started

Configuration

Reference

Fetch

Getting started

Configuration

Reference

Jasmine

Getting started

Configuration

Reference

JBehave

Getting started

Configuration

Reference

Jest

Getting started

Configuration

Reference

JUnit 4

Getting started

Configuration

Reference

JUnit 5

Getting started

Configuration

Reference

Mocha

Getting started

Configuration

Reference

Newman

Getting started

Configuration

Reference

NUnit

Getting started

Configuration

Reference

PHPUnit

Getting started

Configuration

Reference

Playwright

Getting started

Configuration

Reference

pytest

Getting started

Configuration

Reference

Pytest-BDD

Getting started

Configuration

Reference

Reqnroll

Getting started

Configuration

Reference

REST Assured

Getting started

Configuration

Robot Framework

Getting started

Configuration

Reference

Rust Cargo Test

Getting started

Configuration

Reference

RSpec

Getting started

Configuration

Reference

SpecFlow

Getting started

Configuration

Reference

Spock

Getting started

Configuration

Reference

TestNG

Getting started

Configuration

Reference

Vitest

Getting started

Configuration

Reference

WebdriverIO

Getting started

Configuration

Reference

xUnit.net

Getting started

Configuration

Reference

On this page

Allure Fetch reference ​

Attachment schema ​

Each HTTP exchange is recorded as a JSON attachment with content type application/vnd.allure.http+json and file extension .httpexchange. The root object has the following shape:

FieldTypeDescription
schemaVersion1Schema version. Always 1.
startnumberUnix timestamp in milliseconds when the request started.
stopnumberUnix timestamp in milliseconds when the response or error was received.
requestobjectCaptured request data. See Request.
responseobjectCaptured response data. Present only when a response was received. See Response.
errorobjectError information. Present only when the request failed. See Error.

Request ​

FieldTypeDescription
methodstringHTTP method in uppercase, e.g. "GET".
urlstringRequest URL, including query parameters in their original unredacted form.
headers{name, value}[]Request headers after redaction. Omitted when there are no headers.
query{name, value}[]Query parameters parsed from the URL, after redaction. Omitted when there are no query parameters.
cookiesCookie[]Cookies parsed from the Cookie request header, after redaction. Omitted when there are no cookies. See Cookie.
bodyobjectRequest body. Present only when captureRequestBody is true and a body was sent. See Body.

Response ​

FieldTypeDescription
statusnumberHTTP status code.
statusTextstringHTTP status text.
headers{name, value}[]Response headers after redaction. Omitted when there are no headers.
cookiesCookie[]Cookies parsed from Set-Cookie response headers, after redaction. Omitted when there are no Set-Cookie headers. See Cookie.
bodyobjectResponse body. Present only when captureResponseBody is true and a body was received. See Body.

Request and response bodies are captured from cloned Request and Response objects before they are consumed, so the Response returned to your test code remains fully readable.

Body ​

FieldTypeDescription
contentTypestringValue of the Content-Type header. Absent when no Content-Type header is present.
encoding"utf8" | "base64"Encoding used for value. Present for all captured bodies except multipart. See Body encoding.
valuestringThe captured body content, encoded per encoding. Present for all captured bodies except multipart.
sizenumberBody size in bytes. See Body size.
truncatedbooleantrue when the body exceeded maxBodySize and was cut off.
form{name, value}[]Structured fields parsed from a application/x-www-form-urlencoded body, after redaction. See URL-encoded form bodies.
streamobjectPresent alongside value when the body was truncated during streaming. See Stream bodies.
partsobject[]Structured parts for multipart/form-data bodies. See Multipart bodies. Present instead of value, encoding, and stream.

Body encoding ​

encoding is determined by the Content-Type header:

  • Text content types — text/*, application/json, application/javascript, application/x-www-form-urlencoded, application/xml, or any type ending in +json or +xml → "utf8".
  • No Content-Type header → "utf8" (treated as text).
  • All other content types → "base64".

URL-encoded form bodies ​

When the content type is application/x-www-form-urlencoded, the body contains two representations of the same data:

  • value: the re-serialized URL-encoded string, with sensitive fields replaced by the redaction placeholder.
  • form: a structured {name, value}[] array with the same redaction applied.

Stream bodies ​

When a body exceeds maxBodySize, reading stops and the stream field appears alongside value to indicate partial capture:

FieldTypeDescription
completebooleanAlways false when stream is present.
typestringStream type derived from the content type: text/event-stream → "server-sent-events", application/grpc → "grpc", all others → "chunked".

When stream is present, value contains the captured bytes up to maxBodySize and truncated is true.

Multipart bodies ​

When the content type is multipart/form-data, the body is parsed via the Web API formData() method and stored as a parts array instead of value. Each part is one of:

  • Text field: { name, encoding: "utf8", value, size, truncated: false }. Sensitive field values are redacted.
  • File part: { name, fileName?, contentType?, size, truncated: false }. File contents are not captured; only the metadata is recorded.

Body size ​

The size field uses the Content-Length header when present. If Content-Length is absent and the body was fully captured within maxBodySize, size is the actual byte count. If Content-Length is absent and the body was truncated, size is omitted.

Cookie ​

Request cookies are parsed from the Cookie header. Response cookies are parsed from Set-Cookie headers.

FieldTypeDescription
namestringCookie name.
valuestringCookie value, after redaction.
pathstringPath attribute. Response cookies only.
domainstringDomain attribute. Response cookies only.
expiresstringExpires attribute. Response cookies only.
httpOnlybooleantrue when the HttpOnly attribute is present. Response cookies only.
securebooleantrue when the Secure attribute is present. Response cookies only.
sameSitestringSameSite attribute value. Response cookies only.

Error ​

Present when the request failed. In fetch, this occurs for transport errors (e.g., network failure), aborts (via AbortController), and response body stream errors. HTTP error responses (4xx and 5xx) are not errors — they produce a normal response with no error field.

FieldTypeDescription
namestringThe error's name property.
messagestringThe error message.
stackstringStack trace. Present only when includeErrorStack is true.

Redaction types ​

RedactionMatcher ​

A RedactionMatcher controls whether a specific field value should be redacted. It can be any of the following:

  • A string: redacts any field whose name equals the string, case-insensitively.
  • A RegExp: redacts any field whose name matches the pattern.
  • A function (name: string, value: string, context: RedactionContext) => boolean: redacts based on any logic, with access to the field name, value, and surrounding context.
ts
withAllure(fetch, {
  redactHeaders: [
    "x-api-key", // exact name, case-insensitive
    /^x-internal-/i, // regex on the header name
    (name, value) => value.startsWith("sk-"), // match on the value itself
  ],
});

RedactionContext ​

The context argument passed to a function RedactionMatcher:

PropertyTypeDescription
kind"header" | "query" | "cookie" | "form"Which category is being evaluated.
namestringThe field name.
valuestringThe field value.
urlstring | undefinedThe request URL.
requestRequest | undefinedThe Web API Request object.
responseResponse | undefinedThe Web API Response object. Present only when evaluating response-phase fields (response headers, response cookies).
Pager
Previous pageConfiguration
Next pageGetting started
Powered by

Subscribe to our newsletter

Get product news you actually need, no spam.

Subscribe
Allure TestOps
  • Overview
  • Why choose us
  • Cloud
  • Self-hosted
  • Success Stories
Company
  • Documentation
  • Blog
  • About us
  • Contact
  • Events
© 2026 Qameta Software Inc. All rights reserved.
A Markdown version of this page is available at /docs/fetch-reference.md