HttpOutput Type

Constructors

Constructor Description

HttpOutput(connection, runtime)

Full Usage: HttpOutput(connection, runtime)

Parameters:
Returns: HttpOutput
connection : Connection
runtime : HttpRuntime
Returns: HttpOutput

Instance members

Instance member Description

this.Connection

Full Usage: this.Connection

Returns: Connection
Returns: Connection

this.executeTask task

Full Usage: this.executeTask task

Parameters:
Returns: Async<HttpContext option>
task : Async<HttpContext option>
Returns: Async<HttpContext option>

this.run request webPart

Full Usage: this.run request webPart

Parameters:
Returns: Task<Result<bool, Error>>

Check if the web part can perform its work on the current request. If it can't it will return None and the run method will return.

request : HttpRequest
webPart : WebPart
Returns: Task<Result<bool, Error>>

this.writeContent writePreamble context

Full Usage: this.writeContent writePreamble context

Parameters:
Returns: HttpContent -> Task<unit>
writePreamble : bool
context : HttpContext
Returns: HttpContent -> Task<unit>

this.writeContentLengthHeader content context

Full Usage: this.writeContentLengthHeader content context

Parameters:
Returns: Task<unit>
Modifiers: inline
content : byte[]
context : HttpContext
Returns: Task<unit>

this.writeContentType headers

Full Usage: this.writeContentType headers

Parameters:
    headers : (string * string) list

Returns: ValueTask
Modifiers: inline
headers : (string * string) list
Returns: ValueTask

this.writeHeaders exclusions headers

Full Usage: this.writeHeaders exclusions headers

Parameters:
    exclusions : string list
    headers : (string * string) list

Returns: Task<unit>
 Walk the response headers list directly via pattern matching. Compared to the previous
 implementation which iterated through the `seq<_>` interface and called `GetEnumerator()`,
 this avoids:
   - enumerator allocation per response,
   - boxing the list into IEnumerable on the call site,
   - per-iteration closure allocations from `List.exists`.
 The cons cells of the input list already exist (the caller built them); we simply
 traverse them with no extra allocation.
exclusions : string list
headers : (string * string) list
Returns: Task<unit>

this.writePreamble response

Full Usage: this.writePreamble response

Parameters:
Returns: Task<unit>
response : HttpResult
Returns: Task<unit>

this.writeResponse newCtx

Full Usage: this.writeResponse newCtx

Parameters:
Returns: Task<unit>
newCtx : HttpContext
Returns: Task<unit>