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 Axios 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, recorded 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.

For HTTP error responses (4xx and 5xx status codes), both response and error are present simultaneously: response contains the status, headers, and body of the error response, while error contains the AxiosError details.

Request ​

FieldTypeDescription
methodstringHTTP method in uppercase, e.g. "GET".
urlstringResolved request 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.

Response bodies are captured from response.data — the value after Axios applies its response transforms. When responseType is 'json' (the default), Axios parses the response as JSON before Allure Axios sees it, so the captured value is the parsed object re-serialized with JSON.stringify. This produces compact JSON regardless of how the server formatted the original response. To capture the unmodified response bytes, set responseType: 'arraybuffer' or responseType: 'text' on the Axios request.

Body ​

FieldTypeDescription
contentTypestringValue of the Content-Type header. Absent when no Content-Type header is present.
encoding"utf8" | "base64"Encoding used for value. Present only for non-stream bodies. See Body encoding.
valuestringThe captured body content, encoded per encoding. Absent for stream and multipart bodies.
sizenumberBody size in bytes. For non-stream bodies, always present. For stream bodies, present only when a Content-Length header is available; absent otherwise. See Body size.
truncatedbooleantrue when the body exceeded maxBodySize and was cut off. Always false for stream bodies.
form{name, value}[]Structured fields parsed from a application/x-www-form-urlencoded body, after redaction. See URL-encoded form bodies.
stream{type: string}Present instead of value and encoding for stream and multipart bodies. See Stream bodies.

Body encoding ​

encoding depends on the JavaScript type of the body data, not primarily on the Content-Type header:

  • string, URLSearchParams, plain objects (JSON-serialized), and any other non-binary value → "utf8".
  • ArrayBuffer and typed arrays → "base64".
  • Blob → determined by Blob.type: "utf8" when Blob.type is text/*, application/json, application/javascript, application/x-www-form-urlencoded, application/xml, or ends in +json or +xml; "base64" for all other types. A missing or empty Blob.type is treated as text.

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 ​

Bodies that cannot be read without consuming them are not captured. The stream field is present instead of value. The following are treated as streams:

  • Node.js readable streams and async iterables — objects with a pipe, read, or Symbol.asyncIterator property, excluding URLSearchParams, ArrayBuffer, and typed arrays.
  • Objects from the form-data npm package.
  • Any body whose Content-Type is multipart/form-data.

Blob bodies are captured, not treated as streams — Allure Axios reads them via arrayBuffer(). Encoding is determined by Blob.type, not the request Content-Type header.

json
{ "stream": { "type": "chunked" } }

The type is derived from the content type: text/event-stream → "server-sent-events", application/grpc → "grpc", all others → "chunked".

Body size ​

The size field uses the Content-Length header when present. If Content-Length is absent, size is the actual byte count of the captured data. For truncated bodies, size may therefore be larger than the length of the stored value.

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 — whether due to a transport error, cancellation, or an HTTP error response.

FieldTypeDescription
namestringThe error's name property.
messagestringThe error message.
stackstringStack trace. Present only when includeErrorStack is true and the thrown value is an Error instance.

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
instrumentAxios(client, {
  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 resolved request URL.
requestInternalAxiosRequestConfig | undefinedThe Axios request config.
responseAxiosResponse | undefinedThe Axios response. 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/axios-reference.md