Get started with wretch CDN
MIT licensed
The Wretch library is a lightweight, modular solution for making asynchronous HTTP requests.
Tags:- wretch
- fetch
- ajax
- request
Stable version
Copied!
How to start using wretch CDN
const Wretch = require('wretch');
// Create a new instance of Wretch
const wretch = new Wretch();
// Define the URL to fetch
const url = 'https://jsonplaceholder.typicode.com/todos/1';
// Make the GET request and handle the response
wretch(url)
.get()
.map(response => response.json())
.tap(data => console.log(data))
.catch(error => console.error(error))
.end();
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
All versions
1.5.0
1.5.1
1.5.2
1.5.3
1.5.4
1.5.5
1.6.0
1.7.0
1.7.1
1.7.10
1.7.2
1.7.3
1.7.4
1.7.5
1.7.6
1.7.7
1.7.8
1.7.9
2.0.0
2.0.0-next.0
2.0.0-next.1
2.0.1
2.0.2
2.0.3
2.0.4
2.1.0
2.1.1
2.1.2
2.1.3
2.1.4
2.1.5
2.10.0
*** 2.11.0
2.2.0
2.2.1
2.2.2
2.2.3
2.3.0
2.3.1
2.3.2
2.4.0
2.4.1
2.5.0
2.5.1
2.5.2
2.6.0
2.7.0
2.7.1
2.8.0
2.8.1
2.9.0
2.9.1