https://github.com/sailscastshq/sails-hook-node-fetch
Exposes the light-weight node-fetch module as a built-in helper in your Sails app
https://github.com/sailscastshq/sails-hook-node-fetch
fetch node-fetch node-module nodejs sails-hook sailsjs
Last synced: 25 days ago
JSON representation
Exposes the light-weight node-fetch module as a built-in helper in your Sails app
- Host: GitHub
- URL: https://github.com/sailscastshq/sails-hook-node-fetch
- Owner: sailscastshq
- License: mit
- Created: 2020-10-19T09:13:26.000Z (over 5 years ago)
- Default Branch: develop
- Last Pushed: 2020-10-19T21:43:16.000Z (over 5 years ago)
- Last Synced: 2025-10-02T01:52:15.716Z (4 months ago)
- Topics: fetch, node-fetch, node-module, nodejs, sails-hook, sailsjs
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/@sailscasts/sails-hook-node-fetch
- Size: 9.77 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: license.md
Awesome Lists containing this project
README
# sails-hook-node-fetch
[](https://github.com/acekyd/made-in-nigeria)
## Archive Notice
**This package has been archived and is no longer maintained.**
### Why was this package archived?
`@sailscasts/sails-hook-node-fetch` was created to provide a convenient `sails.helpers.fetch` helper for making HTTP requests in Sails.js applications. However, with Node.js 18+ now providing native `fetch` support, this package is no longer necessary.
### Migration
Replace any usage of `sails.helpers.fetch` with the native `fetch` API:
```javascript
// Before (using sails-hook-node-fetch)
const response = await sails.helpers.fetch('https://api.example.com/data')
// After (using native fetch)
const response = await fetch('https://api.example.com/data')
const data = await response.json()
```
### Requirements
- Node.js 18.0.0 or higher (for native `fetch` support)
### Related
Packages that previously depended on this hook (like `sails-hook-wish`) have been updated to use native `fetch` instead.