UNPKG

@empathyco/x-components

Version:
28 lines (16 loc) 831 B
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [FetchAndSaveHooks](./x-components.fetchandsavehooks.md) &gt; [fetch](./x-components.fetchandsavehooks.fetch.md) ## FetchAndSaveHooks.fetch() method Retrieves and returns asynchronously some data. **Signature:** ```typescript fetch(context: Context, request: Request): Promise<Response>; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | context | Context | The [context](https://vuex.vuejs.org/guide/actions.html) of the actions, provided by Vuex. | | request | Request | The request object used for fetching. | **Returns:** Promise&lt;Response&gt; A Promise resolved with the response of the fetch request.