@empathyco/x-components
Version:
Empathy X Components
28 lines (16 loc) • 831 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [FetchAndSaveHooks](./x-components.fetchandsavehooks.md) > [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<Response>
A Promise resolved with the response of the fetch request.