mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-25 11:11:46 +08:00
13 lines
345 B
TypeScript
13 lines
345 B
TypeScript
/// <reference path="superagent.d.ts" />
|
|
|
|
import superagent = require('superagent')
|
|
|
|
var agent = superagent.agent();
|
|
agent
|
|
.post('http://localhost:3000/signin')
|
|
.send({ email: 'test@dummy.com', password: 'bacon' })
|
|
.end((err, res) => {
|
|
if (err) throw err;
|
|
if (res.status !== 200) throw new Error('bad status ' + res.status);
|
|
});
|