Class ProtoHttpResponseOptions

Namespace
ProtoTest.Http
Assembly
ProtoTest.Http.dll

Controls how HTTP response bodies are buffered, shared by the REST and GraphQL integrations. Each protocol registers an instance created with its own configuration section.

public class ProtoHttpResponseOptions : IProtoConfigurableOptions
Inheritance
ProtoHttpResponseOptions
Implements
Inherited Members
Extension Methods

Constructors

ProtoHttpResponseOptions()

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

public ProtoHttpResponseOptions()

ProtoHttpResponseOptions(string)

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

public ProtoHttpResponseOptions(string configurationSectionName)

Parameters

configurationSectionName string

Properties

ConfigurationSectionName

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

public string ConfigurationSectionName { get; }

Property Value

string

MaxDiagnosticBodyLength

Maximum length of the response body embedded in a failure message, such as the body in a RestStatusAssertionException. Defaults to 64 KiB and binds from the same section, so a protocol's diagnostic cap can be configured alongside its buffering cap.

public int MaxDiagnosticBodyLength { get; set; }

Property Value

int

MaxResponseBodyBytes

Maximum response body size buffered by a convenience API. Defaults to 10 MiB.

public int MaxResponseBodyBytes { get; set; }

Property Value

int