got:简单的请求实用程序

时间:2024-05-18 16:31:35
【文件属性】:

文件名称:got:简单的请求实用程序

文件大小:4KB

文件格式:ZIP

更新时间:2024-05-18 16:31:35

JavaScript

得到了 简单的xhr实用程序。 不支持任何事件。 不支持二进制。 安装 与一起安装: $ component install chemzqm/got 原料药 得到了(URL,[选项],回调) url是要请求的URL 可选option可以包含: method get,post,delete,head,默认情况下get 由encodeURIComponent序列化的query查询字符串或查询对象 body请求正文发送到服务器端,默认情况下由encodeURIComponent编码 type请求正文类型,默认为json和form , form headers头要发送的headers头 timeout请求超时时间,以毫秒为单位,默认为10s 回调函数需要两个参数 err是错误对象,可能是network error , crossDomain error或timeout error


【文件预览】:
got-master
----component.json(315B)
----test()
--------spec.js(2KB)
----Readme.md(1KB)
----index.js(3KB)
----Makefile(243B)

网友评论