mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-25 11:11:46 +08:00
18 lines
330 B
TypeScript
18 lines
330 B
TypeScript
/// <reference path="request-promise.d.ts" />
|
|
|
|
import rp = require('request-promise');
|
|
|
|
rp('http://www.google.com')
|
|
.then(console.dir)
|
|
.catch(console.error);
|
|
|
|
var options: rp.Options = {
|
|
uri : 'http://posttestserver.com/post.php',
|
|
method : 'POST'
|
|
};
|
|
|
|
rp(options)
|
|
.then(console.dir)
|
|
.catch(console.error);
|
|
|