【文件属性】:
文件名称:got-promise:Promise包装器围绕sindresorhusgot
文件大小:3KB
文件格式:ZIP
更新时间:2021-05-19 20:28:33
JavaScript
承诺
不推荐使用:直接使用got ,因为它现在具有Promise API :party_popper: 。
安装
$ npm install --save got-promise
用法
var got = require ( 'got-promise' ) ;
got ( 'google.com' )
. then ( function ( res ) {
console . log ( res . body ) ;
} )
. catch ( function ( err ) {
console . error ( err ) ;
console . log ( err . response . body ) ;
} ) ;
got . post ( 'google.com' ) ; // => Promise
原料药
看一下 。
执照
麻省理工学院:copyright:
【文件预览】:
got-promise-master
----.gitignore(13B)
----.gitattributes(12B)
----.jshintrc(170B)
----package.json(561B)
----readme.md(669B)
----index.js(48B)
----test.js(357B)
----.travis.yml(72B)
----.editorconfig(231B)
----license(1KB)