leer0911 / Myxhr
TypeScript 重构 Axios 经验分享,包括开发技巧, API 实现,XMLHttpRequest 运用,单元测试等
Stars: ✭ 102
Programming Languages
typescript
32286 projects
Projects that are alternatives of or similar to Myxhr
vue-webpack-boilerplate
A webpack boilerplate with vue-loader, axios, vue-router and vuex
Stars: ✭ 51 (-50%)
Mutual labels: karma, axios
Cookiecutter Webpack
Boilerplate for webpack 2, babel, react + redux + hmr, and karma. Can be inserted into existing django projects.
Stars: ✭ 87 (-14.71%)
Mutual labels: karma
Spala
Spala (SPA LARAVEL): a modern lightweight CMS for Laravel and Vue developers (open source project).
Stars: ✭ 91 (-10.78%)
Mutual labels: axios
Placeline Nextjs
HyperTrack Placeline web application sample using NextJS, Ant-Design, Styled-Components, and Heroku
Stars: ✭ 88 (-13.73%)
Mutual labels: axios
Retrofit Cjs
retrofit-cjs 是一个基于JavaScript装饰器(Decorator)和 axios 实现的网络请求库, 支持Vue / React / react-native 等常用框架
Stars: ✭ 87 (-14.71%)
Mutual labels: axios
Vue Typescript Music
🔥 基于 vue 全家桶 音乐项目(Music project) vue+typescript 实现 高仿 网易云音乐 移动端WebApp
Stars: ✭ 94 (-7.84%)
Mutual labels: axios
Egg Vue Webpack Boilerplate
Egg Vue Server Side Render (SSR) / Client Side Render (CSR)
Stars: ✭ 1,302 (+1176.47%)
Mutual labels: axios
Karma Benchmark
A Karma plugin to run Benchmark.js over multiple browsers with CI compatible output.
Stars: ✭ 88 (-13.73%)
Mutual labels: karma
Xyy Vue
🎨基于vue+vue-router+vuex+axios+webpack开发的个人Demo《Qu约》
Stars: ✭ 1,316 (+1190.2%)
Mutual labels: axios
Reactjs Spring Boot Crud Full Stack App
Learn how to develop a full-stack CRUD application using React as frontend and spring boot as backend.
Stars: ✭ 90 (-11.76%)
Mutual labels: axios
Django Auth0 Vue
A Django REST Framework + Vue.js CRUD Demo Secured Using Auth0
Stars: ✭ 99 (-2.94%)
Mutual labels: axios
myXHR
又是一篇关于 TypeScript 的分享,上次用 TypeScript 重构 Vconsole 的项目 埋下了对 Axios 源码解析的梗。于是,这次分享的主题就是 如何从零用 TypeScript 重构 Axios 以及为什么我要这么做。
教程
特性
- √ 从浏览器创建 XMLHttpRequest
- √ 支持 Promise API
- √ 拦截请求和响应
- √ 转换请求和响应数据
- √ 取消请求
- √ 自动转换 JSON 数据
- √ 客户端支持防止 XSRF
开始
# 安装依赖
yarn
# 开发及调试
yarn dev
# 构建
yarn build
# 测试
yarn test
欢迎各位重构,相互交流!
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].