Skip to content

Ray-56/axios-decorator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

axios-decorator

基于Decorator封装axios

安装

使用修饰器

  • @GET
@GET('/v1/topics')
@GET('/v1/{0}', 'topics')
@GET('https://cnodejs.org/api/v1/topics')
@GET({url: '/v1/topics', params: {limit: 10}})
@GET('/v1/topic/{topicId}')
  • @POST
@POST({url: '/user', data: {id: 99, name: '99归一'}})
  • @PUT
  • #DELETE
  • #HTTP
  • #Config
    • 请求信息, 与axios一致
  • #Headers
    • 请求头
  • #Cancel
  • #Multipart
  • #FormUrlEncoded
    • 文件上传

About

基于Decorator封装axios

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages