Code Monkey home page Code Monkey logo

charles2postman's Introduction

Charles2Postman

recommend: China-GiteeOther-Github

功能说明

测试小伙伴,经常使用Charles抓取数据包,但要将数据包内容复制到postman这是是一件费时费力的事情。

Charles2Postman可以帮助你,批量将Charles导出的抓包请求响应数据文件,快速转成支持导入postman格式,

让你在没有restful API设计文档情况下,快速构建postman客户端请求脚本,无需再一个个参数复制粘贴,节省时间。

支持基于http、https协议请求,请求数据类型支持urlencoded、json、form-data、html

版本

charles 版本 4.2.6

postman 版本 7.12.0

node 版本 大于v8.11.4

感谢guohao0328提出的第一个bug

环境

下载并安装nodejs

https://nodejs.org/en/

使用

进入目录

cd charles2postman

安装依赖

npm install

使用charles抓包工具

将抓包内容,从charles中导出

img

注意:导出请求格式为:JSON Session File(.chlsj),保存至Charles2Postman目录下File文件夹中。

选择导出格式为".chlsj"

img

将导出文件,保存至File文件夹中

img

注意:File文件下面,不要放入其他格式的文件,仅能存放charles导出.chlsj格式文件,否则解析会出错。

开始转换

方式一:

双击run.bat文件

img

方式二:

npm run start

img

sudo sh run.sh

输出文件

转换结果,生成在outputFile目录下

./outputFile/postman_collection.json

img

将转换结果,导入postman

将这个postman_collection.json导入postman中

img

最终效果

img

对你有所帮助的话,记得start下项目,谢谢你的支持

charles2postman's People

Contributors

liyinchigithub avatar

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.