Class ProtoHttpAttachmentOptions
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
configurationSectionNamestring
Properties
CaptureExpectedShapes
Captures the expected shape used by shape assertions. Defaults to true.
public bool CaptureExpectedShapes { get; set; }
Property Value
CaptureRequestBodies
Captures outgoing request bodies as attachments. Defaults to true.
public bool CaptureRequestBodies { get; set; }
Property Value
CaptureResponses
Captures response bodies as attachments. Defaults to true.
public bool CaptureResponses { get; set; }
Property Value
ConfigurationSectionName
The configuration section this instance binds from, e.g. "ProtoTest:Rest:Attachments".
public string ConfigurationSectionName { get; }
Property Value
SensitiveHeaders
Header names whose values are redacted in diagnostics.
public List<string> SensitiveHeaders { get; set; }
Property Value
SensitiveQueryParameters
Query parameter names whose values are redacted in diagnostics.
public List<string> SensitiveQueryParameters { get; set; }