createHttpDataProvider 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
| Parameter | Type | Optional | Description |
|---|---|---|---|
url | string | No | Value matching url's declared type and the owning object's validation rules. |
fetcher | ((input: RequestInfo | URL, init?: RequestInit) => Promise<Response>) | undefined | Yes | Value 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);