Class HttpExchangeSerializer

java.lang.Object
io.qameta.allure.http.HttpExchangeSerializer

public final class HttpExchangeSerializer extends Object
Serializes HTTP exchange attachments using the Jackson runtime bundled with allure-java-commons.
  • Method Details

    • toJsonBytes

      public static byte[] toJsonBytes(HttpExchange exchange)
      Serializes the exchange to UTF-8 JSON bytes.

      The serializer does not apply redaction or truncation. Build exchanges with HttpExchange.builder() to apply capture policy before serialization.

      Parameters:
      exchange - the exchange to serialize
      Returns:
      the serialized exchange