Skip to content

JSON Loader

Загрузчик для json контента. Выполняет запрос к указанному ресурсу используя Fetch API.

ts
const resources = [
	{
		type: "json",
		name: "schema",
		url: "/path/to/json",
		options: {
			credentials: "include",
			headers: {
				"Content-Type": "application/json",
				Authorization: "Bearer ...",
			},
		},
	},
];

Resource

  • type - json

  • url - Ссылка на загружаемый ресурс

  • options optional - RequestInit объект