Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lewis-wow/svelte-fetchable
https://github.com/lewis-wow/svelte-fetchable
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/lewis-wow/svelte-fetchable
- Owner: lewis-wow
- Created: 2022-10-24T20:52:36.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2022-11-23T09:14:24.000Z (about 2 years ago)
- Last Synced: 2024-11-06T00:27:49.364Z (2 months ago)
- Language: TypeScript
- Size: 30.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# svelte fetchable
```bash
npm i svelte-fetchable
``````svelte
import fetchable from 'svelte-fetchable'
const [resultFetch, loadingFetch] = fetchable.post('https://jsonplaceholder.typicode.com/posts')
{#if $loadingFetch}
loading...
{:else}
result: {JSON.stringify($resultFetch)}
{/if}
resultFetch.fetch({ username: 'John Doe' })}>Fetch
Abort
```