GithubHelp home page GithubHelp logo

xuezh01 / autojsmoduleanddemo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yuenshui/autojsmoduleanddemo

0.0 0.0 0.0 6 KB

有需要定制封装包的同学,到:https://github.com/yuenshui/autojsModuleAndDemo/issues 这里留言

JavaScript 100.00%

autojsmoduleanddemo's Introduction

收录平时写的或其他朋友的代码,封装整理,方便开发使用。也希望有同样想法的朋友提供代码模块

模块

http模块

/modules/http.js
demo: /demo/http.js
此模块主要针对auto.js提供的http模块没有超时选项,可能导致进程卡死的问题
auto.js原有http模块文档:http://docs.autojs.org/#/http

/**
 * 对auto.js原有http模块简单封装
 * request、get、post、postJson、postMultipart方法的使用参考auto.js的http模块文档;options增加了timeout选项,缺省10000毫秒
 * put方法:
 * httpclient.put(url, options, callback)
 * url {string} 请求URL地址
 * options {Object} 请求选项,参考request方法的options说明
 * options.method设置无效,强制为PUT
 * options.timeout 超时时间,可选,单位毫秒缺省为10000
 * options.file PUT上传的文件,可选,由此选项,options.body选项将无效
 * options.fileName 文件名,可选,发送到接口的文件名,和options.file的文件名无关,也可以相同
 * 
 * 1、options增加timeout可选项,缺省10000(10秒)
 * 2、增加put方法
 * @author Mustang ([email protected])
 * @license MIT
 */

autojsmoduleanddemo's People

Contributors

yuenshui avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.