Giter VIP home page Giter VIP logo

cute-http's Issues

muti 发送多个请求的地方 有个笔误啊 方法用错啦吧

function multi(items, extendedAxiosConfig) {
var conf = _makeConfig(extendedAxiosConfig);
var tasks = items.forEach(function (item) {
var task;
var type = item.type;
var url = item.url;

if (conf.failStrategy === cst.KEEP_ALL_BEEN_EXECUTED) {
  if (type === 'get') task = _get(url, conf).catch(function (err) { return err; });
  else if (type === 'post') task = _post(url, item.body, conf).catch(function (err) { return err; });
  else if (type === 'jsonp') task = _jsonp(url, conf).catch(function (err) { return err; });
} else {
  if (type === 'get') task = _get(url, conf);
  else if (type === 'post') task = _post(url, item.body, conf);
  else if (type === 'jsonp') task = _jsonp(url, conf);
}
return task;

});
return Promise.all(tasks);
}

tasks = items.forEach ==> tasks.items.map; 这个笔误 其实还很严重的;

get请求回来的数据,没有设置到内存中去?

写的挺不错,但是我没有看到你的,setResultToMemory,这个方法在获取得到参数之后进行设置,同时,你的get请求进行的缓存,没有考虑到query参数吧?因为我看你缓存的是一个path,路径,后面的参数都丢弃了,这肯定会造成缓存的数据混乱

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.