Table of Contents

Interface IHostBufferPolicySelector

Namespace
System.Web.Http.Hosting
Assembly
System.Web.Http.dll

Interface for controlling the use of buffering requests and responses in the host. If a host provides support for buffering requests and/or responses then it can use this interface to determine the policy for when buffering is to be used.

public interface IHostBufferPolicySelector

Methods

UseBufferedInputStream(object)

Determines whether the host should buffer the HttpRequestMessage entity body.

bool UseBufferedInputStream(object hostContext)

Parameters

hostContext object

The host context.

Returns

bool

true if buffering should be used; otherwise a streamed request should be used.

UseBufferedOutputStream(HttpResponseMessage)

Determines whether the host should buffer the entity body.

bool UseBufferedOutputStream(HttpResponseMessage response)

Parameters

response HttpResponseMessage

The HTTP response message.

Returns

bool

true if buffering should be used; otherwise a streamed response should be used.