TX Sheet Control

createHttpDataProvider Function

Function

Public function for createHttpDataProvider.

Package: @txtextcontrol/tx-sheet-control. Version: 2.0.0.

ES module import: import { createHttpDataProvider } from '@txtextcontrol/tx-sheet-control';.

Syntax

createHttpDataProvider(url: string, fetcher?: typeof fetch): DataProvider

Parameters

ParameterTypeOptionalDescription
urlstringNoValue matching url's declared type and the owning object's validation rules.
fetcher((input: RequestInfo | URL, init?: RequestInit) => Promise<Response>) | undefinedYesValue matching fetcher's declared type and the owning object's validation rules.

Return Value

DataProvider.

Examples

Use this public value with the application package shown below. File and font inputs are application-owned resources, not automatically downloaded product data.

import { createHttpDataProvider } from '@txtextcontrol/tx-sheet-control';

const result = createHttpDataProvider('/assets/sheet/fonts/LiberationSans-Regular.ttf');
console.log(result);

See Also