baiy / Ctool

程序开发常用工具 chrome / edge / firefox / utools / windows / linux / mac
https://ctool.dev
MIT License
1.47k stars 208 forks source link

headers #251

Closed PShiYou closed 1 year ago

PShiYou commented 1 year ago

Hello, can you add a page to format headers? python spiders need to add header information This headers page has three small functions: formatting headers, formatting cookies, and formatting formdata As with pycharm's headers plugin, I prefer to use vscode, but vscode doesn't have a similar plugin

baiy commented 1 year ago

Can you provide similar tools for me to refer to?

PShiYou commented 1 year ago

我截图给你看看 1 2 3 格式化后的headers 格式化后的cookies 格式化formdata

PShiYou commented 1 year ago

大佬可以做一个吗

baiy commented 1 year ago

我看了https://plugins.jetbrains.com/plugin/18299-headers 这个插件 我大致了解了你的要求

https://ctool.dev/tool.html#/tool/httpSnippet 这个功能应该可以满足你部分需求, 后续我也会在这个功能上优化

ps: 上面这个功能的输入在chrome开发者工具中右键请求-复制为cURL

image image
baiy commented 1 year ago
image
PShiYou commented 1 year ago

@baiy 佬,https请求工具有个小bug(python的),网页headers里的某个key的value值带有引号,使用你的开发的工具并未将引号转义。列如:Sec-Ch-Ua:"Not.A/Brand";v="8", "Chromium";v="114", "Microsoft Edge";v="114"
2 1 3

liuxeuman commented 1 year ago

看到有人提了,我就不发了, 还有个问题,生成的代码,携带的json数据未格式化 image, 建议参考 https://curlconverter.com/网站转换的代码