# OfficeDocumentWebReader

Bounded, thread-safe HTTP transport over a caller-configured OfficeDocumentReader.

Class 

`OfficeIMO.Reader.Web`

**Namespace**

`OfficeIMO.Reader.Web`

**Assembly**

`OfficeIMO.Reader.Web`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[OfficeDocumentWebReader.cs:25](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Reader.Web/OfficeDocumentWebReader.cs#L25)

**Modifiers**

sealed

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](/api/reader-web/officeimo-reader-web-readerweboptions/) 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

- Method [OfficeDocumentReaderWebExtensions.CreateWebReader](/api/reader-web/officeimo-reader-web-officedocumentreaderwebextensions/#method-createwebreader-officeimo-reader-officedocumentreader-officeimo-reader-web-readerweboptions)

Filter members 

Show inherited

## Constructors

OfficeDocumentWebReader 2 overloads

`public OfficeDocumentWebReader(OfficeDocumentReader reader, ReaderWebOptions? options = null)` [#](#constructor-ctor-officeimo-reader-officedocumentreader-officeimo-reader-web-readerweboptions)

[OfficeDocumentWebReader.cs:25](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Reader.Web/OfficeDocumentWebReader.cs#L25)

Creates a bounded web reader over an existing Reader that downloads through OfficeIMO's address-checked transport.

Parameters

**reader OfficeIMO.Reader.OfficeDocumentReader required**

**options OfficeIMO.Reader.Web.ReaderWebOptions? = null optional**

`public OfficeDocumentWebReader(OfficeDocumentReader reader, HttpClient httpClient, ReaderWebOptions? options = null)` [#](#constructor-ctor-officeimo-reader-officedocumentreader-net-http-httpclient-officeimo-reader-web-readerweboptions)

[OfficeDocumentWebReader.cs:36](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Reader.Web/OfficeDocumentWebReader.cs#L36)

Creates a bounded web reader over existing Reader and HTTP client instances.

Parameters

**reader OfficeIMO.Reader.OfficeDocumentReader required**

**httpClient System.Net.Http.HttpClient required**

**options OfficeIMO.Reader.Web.ReaderWebOptions? = null optional**

## Methods

`public async Task<string> ConvertToMarkdownAsync(Uri uri, string? sourceName = null, ReaderOptions? readerOptions = null, CancellationToken cancellationToken = default)` [#](#method-converttomarkdownasync-uri-string-officeimo-reader-readeroptions-threading-cancellationtoken)

Downloads one bounded HTTP(S) response and returns the Markdown emitted by the same rich Reader pipeline.

Parameters

**uri System.Uri required**

**sourceName string? = null optional**

**readerOptions OfficeIMO.Reader.ReaderOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`Task<string>`

`public async Task<OfficeDocumentReadResult> ReadDocumentAsync(Uri uri, string? sourceName = null, ReaderOptions? readerOptions = null, CancellationToken cancellationToken = default)` [#](#method-readdocumentasync-uri-string-officeimo-reader-readeroptions-threading-cancellationtoken)

Downloads one bounded HTTP(S) response and routes its body through the configured Reader instance.

Parameters

**uri System.Uri required**

**sourceName string? = null optional**

**readerOptions OfficeIMO.Reader.ReaderOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`Task<OfficeDocumentReadResult>`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

<!-- PowerForge markdown artifact sha256:2FD6948F964EFCFEB5C916A2227BE57CCD7F3D29A2EFF19E660E1E6868630F03 -->
