New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

co-got

Simple wrapper to the got library for co-like interface (node.js generator based code). You can use it with koa or co.

0.0.1
latest
Version published
Maintainers
1
Created

co-got

Simple wrapper to the sindresorhus/got library for co-like interface (node.js generator based code). You can use it with koa or co.

Install

$ npm install --save co-got

Usage

var got = require('co-got');
var co = require('co');

co(function* () {
  var result = yield got.get('http://google.com');
  var data = result[0];
  var response = result[1];
  console.log('Data: ', data);
  console.log('Response: ', response);
})();

API

Same as in sindresorhus/got, but with thunkified methods.

License

MIT © Viyaly Domnikov

Keywords

FAQs

Package last updated on 09 May 2015

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