liyinchigithub / Charles2Postman

将Charles抓包文件,转为支持导入postman文件格式
Apache License 2.0
83 stars 22 forks source link

请问这个工具是否支持批量转换? #10

Closed jiaqiangmochn closed 3 years ago

jiaqiangmochn commented 3 years ago

感谢作者提供的好工具,请问这个工具是否支持批量转换? 就是例如我的接口再charles展示结构如下: -user --fetchUser --deleteUser --updateUser --addUser 1.此时我从user右键Export Session然后导出一个 xxx.chlsj 2.放入Charles2Postman的File文件夹下 执行run.bat 3.但是得到报错如下: SyntaxError: Unexpected token � in JSON at position 0 at JSON.parse () at D:\mjq\test_code\Charles2Postman\index.js:1:10529 at Array.forEach () at Object.getFilesName (D:\xxx\test_code\Charles2Postman\index.js:1:10160) at Object. (D:\xxx\test_code\Charles2Postman\index.js:1:20075) at Module._compile (internal/modules/cjs/loader.js:1133:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10) at Module.load (internal/modules/cjs/loader.js:977:32) at Function.Module._load (internal/modules/cjs/loader.js:877:14) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)

liyinchigithub commented 3 years ago

你好,目前版本支持批量导出,但需要单独导出user层级底下每个接口 --fetchUser 导出为fetchUser.chlsj --deleteUser 导出为deleteUser.chlsj --updateUser 导出为updateUser.chlsj --addUser 导出为addUser.chlsj 将这四个导出文件放置到放入Charles2Postman的File文件夹下 执行run.bat 转换结果 会合并到一个collection.json中 image image

liyinchigithub commented 1 year ago

@jiaqiangmochn 1.4.0版本最新版,已支持批量转换导出单个、多个文件解析