Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

flumm-fetch

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flumm-fetch

## Usage Example ### async / await ```javascript import fetch from "flumm-fetch";

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

flumm-fetch

Usage Example

async / await

import fetch from "flumm-fetch";

// GET
(async () => {
  const query = await fetch("https://example.com/file.json");
  const result = await query.json();
  console.log(result);
})();

// POST
(async () => {
  const opts = {
    method: "POST",
    body: {
      name: "John Doe",
      password: "pwd"
    }
  };
  const query = await fetch("https://example.com/file.json", opts);
  const result = await query.json();
  console.log(result);
})();

promises

import fetch from "flumm-fetch";

// GET
fetch("https://google.de")
  .then(res => res.text())
  .then(res => console.log(res))
  .catch(console.error);

// POST
const opts = {
  method: "POST",
  body: {
    name: "John Doe",
    password: "pwd"
  }
};
fetch("https://google.de", opts)
  .then(res => res.text())
  .then(res => console.log(res))
  .catch(console.error);

License

This project is licensed under the MIT license, see LICENSE.

Keywords

FAQs

Package last updated on 13 Feb 2020

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc