made with esnextbin
testing superagent 304 not modified
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 |