Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
fable-import-fetch
Advanced tools
Fable bindings for Fetch API
The Fetch API provides a JavaScript interface for accessing and manipulating parts of the HTTP pipeline, such as requests and responses. It also provides a global fetch() method that provides an easy, logical way to fetch resources asynchronously across the network.
See: https://developer.mozilla.org/en/docs/Web/API/Fetch_API
$ npm install --save fable-core
$ npm install --save-dev fable-import-fetch
<ItemGroup>
<Reference Include="node_modules/fable-core/Fable.Core.dll" />
</ItemGroup>
<ItemGroup>
<Compile Include="node_modules/fable-import-fetch/Fable.Import.Fetch.fs" />
<Compile Include="node_modules/fable-import-fetch/Fable.Helpers.Fetch.fs" />
</ItemGroup>
#r "node_modules/fable-core/Fable.Core.dll"
#load "node_modules/fable-import-fetch/Fable.Import.Fetch.fs"
#load "node_modules/fable-import-fetch/Fable.Helpers.Fetch.fs"
open Fable.Core
open Fable.Import.Fetch
open Fable.Helpers.Fetch
// getting data and parsing from JSON
async {
try
let! records = fetchAs<MyRecord[]>("http://www.server.com/data.json" , [])
// ...
with
| error -> ...
}
// posting data to a server
async {
let! response = postRecord(
"http://www.server.com/data.json",
myRecord,
[ RequestProperties.Headers [
HttpRequestHeaders.Accept "application/xml" ]
])
if response.ok then
match response.Headers.ContentType with
| None -> // ...
| Some contentType -> // ...
}
FAQs
Fable bindings for Fetch
We found that fable-import-fetch demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.