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

Agent Mode

Test steps

Attachments

Test statuses

Assertion diffs

Sorting and filtering

Environments

Multistage Builds

Categories

Visual analytics

Test stability analysis

History and retries

Self-hosted storage

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

Deploying Self-Hosted Storage with Docker

Deploying Self-Hosted Storage on Cloudflare Workers

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

Gradle

Jenkins

JetBrains IDEs

Maven

TeamCity

Visual Studio Code

Frameworks

AVA

Getting started

Configuration

Reference

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

Dart and Flutter

Getting started

Configuration

Reference

Diesel

Getting started

Configuration

Reference

Fetch

Getting started

Configuration

Reference

Go

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

Node.js Test Runner

Getting started

Configuration

Reference

NUnit

Getting started

Configuration

Reference

PHPUnit

Getting started

Configuration

Reference

Playwright

Getting started

Configuration

Reference

Playwright Java

Getting started

Configuration

Reference

pytest

Getting started

Configuration

Reference

Pytest-BDD

Getting started

Configuration

Reference

Reqnroll

Getting started

Configuration

Reference

Reqwest

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

Selenide

Getting started

Configuration

Reference

Selenium BiDi

Getting started

Configuration

Reference

SpecFlow

Getting started

Configuration

Reference

Spock

Getting started

Configuration

Reference

TestCafe

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 Reqwest configuration ​

This page describes CaptureOptions, which controls what AllureReqwestMiddleware and AllureReqwestClient record. Build it with the builder methods below and pass it with .with_options(...):

rust
use allure_reqwest::{AllureReqwestClient, CaptureOptions};

let client = AllureReqwestClient::new(allure).with_options(
    CaptureOptions::default()
        .with_attachment_name("Create order")
        .with_response_body_capture(64 * 1024),
);

Customize the attachment name ​

  • with_attachment_name(name: impl Into<String>)

Sets a fixed name for the step and attachment created for every captured exchange. By default, every exchange is attached under the name HTTP Exchange. Unlike some other Allure HTTP integrations, the name is always a static string — there is no callback that derives it from the request or response.

Control body capture ​

  • without_request_body_capture() — request bodies are captured by default; call this to disable it
  • with_response_body_capture(max_body_size: usize) — response bodies are not captured by default; call this to enable it
  • without_response_body_capture()
  • with_max_body_size(max_body_size: usize) — sets the byte limit

WARNING

There is only one size limit, shared by both request and response body capture — not independent limits per side. with_response_body_capture(n) and with_max_body_size(n) set the same underlying value, so whichever one you call last wins for both sides:

rust
use allure_reqwest::CaptureOptions;

// max_body_size ends up 1024 for BOTH request and response capture — the with_max_body_size(5)
// call is overwritten by with_response_body_capture's own argument, which runs after it.
let a = CaptureOptions::default()
    .with_max_body_size(5)
    .with_response_body_capture(1024);

// max_body_size ends up 5 for BOTH sides — with_max_body_size runs last here.
let b = CaptureOptions::default()
    .with_response_body_capture(1024)
    .with_max_body_size(5);

If you want a specific request-body limit together with response capture, call with_max_body_size(...) after with_response_body_capture(...).

The default limit is 64 KiB (65536 bytes). Bodies larger than the limit are captured up to the limit and flagged truncated: true in the attachment — size still reports the full, untruncated byte count. See the reference for the exact fields.

Response bodies are only captured when the body can be fully buffered: AllureReqwestClient and AllureReqwestMiddleware read the response into memory, record it, and reconstruct an equivalent Response so your test code can still read it normally afterward.

Redaction ​

Sensitive header and query-parameter values are replaced with the sentinel string __ALLURE_REDACTED__ before the attachment is written. The defaults are:

CategoryRedacted by default
Headersauthorization, cookie, proxy-authorization, set-cookie
Query parametersaccess_token, api_key, key, password, refresh_token, secret, token

Matching is by exact name, case-insensitive — there is no regex or pattern matching.

  • redact_header(name: impl Into<String>)
  • redact_query_param(name: impl Into<String>)

Both add a name to the existing redaction list rather than replacing it — there is no way to remove a default redacted name, only to add more:

rust
use allure_reqwest::CaptureOptions;

let options = CaptureOptions::default()
    .redact_header("x-internal-secret")
    .redact_query_param("session_id");
// authorization, cookie, etc. are still redacted, plus these two.

Errors ​

When a request fails — a transport error, or a failure while reading the response body — the attachment's error field records the error's type name (reqwest::Error for AllureReqwestClient, reqwest_middleware::Error for AllureReqwestMiddleware) and its display message. There is no option to capture a stack trace.

HTTP error status codes (4xx/5xx) are not treated as errors by allure-reqwest — reqwest itself does not treat them as errors either, so the attachment gets a normal response with no error, the same as any other status code. Call .error_for_status() yourself if you want reqwest to turn a 4xx/5xx response into an Err.

Pager
Previous pageGetting started
Next pageReference
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/reqwest-configuration.md