Class ProtoHttpAttachmentOptions

Namespace
ProtoTest.Http
Assembly
ProtoTest.Http.dll

Base options for capturing and redacting HTTP request/response artifacts, shared by the REST and GraphQL integrations so both observe the same capture and redaction rules. Each protocol registers an instance created with its own configuration section.

public class ProtoHttpAttachmentOptions : JsonDiagnosticOptions, IProtoConfigurableOptions
Inheritance
ProtoHttpAttachmentOptions
Implements
Derived
Inherited Members
Extension Methods

Constructors

ProtoHttpAttachmentOptions()

Creates options for a protocol that does not name a section, defaulting to ProtoTest:Http:Attachments.

public ProtoHttpAttachmentOptions()

ProtoHttpAttachmentOptions(string)

Creates options bound to a known configuration section, e.g. ProtoTest:Rest:Attachments.

public ProtoHttpAttachmentOptions(string configurationSectionName)

Parameters

configurationSectionName string

Properties

CaptureExpectedShapes

Captures the expected shape used by shape assertions. Defaults to true.

public bool CaptureExpectedShapes { get; set; }

Property Value

bool

CaptureRequestBodies

Captures outgoing request bodies as attachments. Defaults to true.

public bool CaptureRequestBodies { get; set; }

Property Value

bool

CaptureResponses

Captures response bodies as attachments. Defaults to true.

public bool CaptureResponses { get; set; }

Property Value

bool

ConfigurationSectionName

The configuration section this instance binds from, e.g. "ProtoTest:Rest:Attachments".

public string ConfigurationSectionName { get; }

Property Value

string

SensitiveHeaders

Header names whose values are redacted in diagnostics.

public List<string> SensitiveHeaders { get; set; }

Property Value

List<string>

SensitiveQueryParameters

Query parameter names whose values are redacted in diagnostics.

public List<string> SensitiveQueryParameters { get; set; }

Property Value

List<string>