OfficeDocumentWebReader
OfficeIMO.Reader.Web
Bounded, thread-safe HTTP transport over a caller-configured OfficeDocumentReader.
Inheritance
- object
- OfficeDocumentWebReader
Remarks
The caller owns the Reader lifetime. A web reader created without an HttpClient uses a shared transport that refuses loopback, private, link-local and other non-public addresses after name resolution and on every redirect, unless ReaderWebOptions.AllowPrivateNetworkAddresses is set. A caller-supplied client stays caller-owned; its handler resolves names, connects and may follow redirects itself, so Reader Web screens only IP literals and localhost names for it.
Usage
Explore 1 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 1
Constructors
public OfficeDocumentWebReader(OfficeDocumentReader reader, ReaderWebOptions? options = null) #Creates a bounded web reader over an existing Reader that downloads through OfficeIMO's address-checked transport.
Parameters
- reader OfficeIMO.Reader.OfficeDocumentReader
- options OfficeIMO.Reader.Web.ReaderWebOptions? = null
public OfficeDocumentWebReader(OfficeDocumentReader reader, HttpClient httpClient, ReaderWebOptions? options = null) #Creates a bounded web reader over existing Reader and HTTP client instances.
Parameters
- reader OfficeIMO.Reader.OfficeDocumentReader
- httpClient System.Net.Http.HttpClient
- options OfficeIMO.Reader.Web.ReaderWebOptions? = null
Methods
public async Task<string> ConvertToMarkdownAsync(Uri uri, string? sourceName = null, ReaderOptions? readerOptions = null, CancellationToken cancellationToken = default) #Downloads one bounded HTTP(S) response and returns the Markdown emitted by the same rich Reader pipeline.
Parameters
- uri System.Uri
- sourceName string? = null
- readerOptions OfficeIMO.Reader.ReaderOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
Task<string>public async Task<OfficeDocumentReadResult> ReadDocumentAsync(Uri uri, string? sourceName = null, ReaderOptions? readerOptions = null, CancellationToken cancellationToken = default) #Downloads one bounded HTTP(S) response and routes its body through the configured Reader instance.
Parameters
- uri System.Uri
- sourceName string? = null
- readerOptions OfficeIMO.Reader.ReaderOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
Task<OfficeDocumentReadResult>