1.npm地址

https://www.npmjs.com/package/qs

2、概述

将url中的参数转为对象;

将对象转为url参数形式

3、示例

复制代码
import qs from 'qs';
const url = 'method=query_sql_dataset_data&projectId=85&appToken=7d22e38e-5717-11e7-907b-a6006ad3dba0';
// 转为对象
console.log(qs.parse(url));
const a = {name:'hehe',age:10};
// 转为url参数形式
console.log(qs.stringify(a))
// 控制台输出 

import qs from 'qs'    qs库的使用

参考:https://www.cnblogs.com/mengfangui/p/9081753.html

 

相关文章:

  • 2022-02-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2019-12-11
  • 2021-12-10
  • 2021-12-30
  • 2022-12-23
相关资源
相似解决方案