Skip to content

Instantly share code, notes, and snippets.

@FeliciousX
Last active January 9, 2017 03:38
Show Gist options
  • Save FeliciousX/f2c0d7d3c9de73b00b9db79bdefb7170 to your computer and use it in GitHub Desktop.
Save FeliciousX/f2c0d7d3c9de73b00b9db79bdefb7170 to your computer and use it in GitHub Desktop.
superagent test

made with esnextbin

testing superagent 304 not modified

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>ESNextbin Sketch</title>
<!-- put additional styles and scripts here -->
</head>
<body>
<!-- put markup and other contents here -->
</body>
</html>
// write ES2015 code and import modules from npm
// and then press "Execute" to run your program
import request from 'superagent';
request
.get( 'https://jsonplaceholder.typicode.com/posts ')
.end( function(err, res) { console.log( res ) } );
{
"name": "esnextbin-sketch",
"version": "0.0.0",
"dependencies": {
"superagent": "2.3.0"
}
}
'use strict';
var _superagent = require('superagent');
var _superagent2 = _interopRequireDefault(_superagent);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
_superagent2.default.get('https://jsonplaceholder.typicode.com/posts ').end(function (err, res) {
console.log(res);
}); // write ES2015 code and import modules from npm
// and then press "Execute" to run your program
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment