@glennsl/rescript-fetch
Advanced tools
Comparing version 0.1.4 to 0.2.0
@@ -14,4 +14,3 @@ { | ||
}, | ||
"suffix": ".bs.js", | ||
"bs-dependencies": ["@ryyppy/rescript-promise"] | ||
"suffix": ".bs.js" | ||
} |
{ | ||
"name": "@glennsl/rescript-fetch", | ||
"version": "0.1.4", | ||
"version": "0.2.0", | ||
"description": "Zero-cost rescript bindings to the WHATWG Fetch API", | ||
@@ -28,8 +28,5 @@ "scripts": { | ||
], | ||
"dependencies": { | ||
"@ryyppy/rescript-promise": "^2.1.0" | ||
}, | ||
"devDependencies": { | ||
"rescript": "^10.0.0" | ||
"rescript": "^10.1.2" | ||
} | ||
} |
# rescript-fetch | ||
Experimental zero-cost rescript bindings to the WHATWG Fetch API | ||
Zero-cost rescript bindings to the WHATWG Fetch API | ||
@@ -12,6 +12,6 @@ [![npm](https://img.shields.io/npm/v/@glennsl/rescript-fetch.svg)](https://npmjs.org/@glennsl/rescript-fetch) | ||
```rescript | ||
let postBanana = data => { | ||
let postBanana = async data => { | ||
open Fetch | ||
fetch( | ||
let response = await fetch( | ||
"/api/bananas", | ||
@@ -25,3 +25,5 @@ { | ||
}, | ||
)->Promise.then(Response.json) | ||
) | ||
await response->Response.json | ||
} | ||
@@ -60,3 +62,8 @@ ``` | ||
### 0.2.0 | ||
* [BREAKING] Updated required minimum version of rescript to 10.1.2 in order to use the new promise type alias and async/await. | ||
* Removed `@ryyppy/rescript-promise` dependency. | ||
### 0.1.0 | ||
Initial release |
Sorry, the diff of this file is not supported yet
10752
0
67
15
- Removed@ryyppy/rescript-promise@^2.1.0
- Removed@ryyppy/rescript-promise@2.1.0(transitive)