apipost-team / apipost-tools Goto Github PK
View Code? Open in Web Editor NEWapipost-tools 是一个一致性、模块化、高性能的 JavaScript 实用工具库。
Home Page: https://www.npmjs.com/package/apipost-tools
License: MIT License
apipost-tools 是一个一致性、模块化、高性能的 JavaScript 实用工具库。
Home Page: https://www.npmjs.com/package/apipost-tools
License: MIT License
可否在美化图标旁边,加一个 json修复工具?就像 这个网站 做的一样:
{ code: 401, msg: 'failed' }
会修复为 {"code":401,"msg":"failed"}
方便直接从js代码中复制 object 到 apipost 中做测试。
我现在有一个需求,需要在websocket开启连接发送http请求握手的时候携带上token校验数据(因为项目使用springsecurity做了鉴权,所有需要jwt鉴权的请求应该都要走那个jwt过滤器,我不希望为websocket再额外做处理)
我查阅了很多资料都是说websocket无法添加自定义请求头,只有说通过设置子协议'sec-websocket-protol'曲线救国,我在前端使用设置这个子协议,就是直接把header"sec-websocket-protol"的值设置为token,这样我需要在jwt过滤器判断一下为这个websocket请求做单独判断,我并不希望这样做。
我的前端创建websocket请求如下
我的后端接收到的请求头如下
然后我使用apipost的websocket接口测试,发现里面可以直接设置请求头,并且对应后就直接是我需要的header,而不是在sec-websocket-protol那里面
例如在apipost中这样设置
对于apipost发送的ws请求,后端接收到的请求头是很完美的
我希望我在前端创建websocket请求并发送的时候,请求头是和apipost所实现的效果是一样的,所以就很想请教一下官方这部分是怎么实现的
安装 apipost 相关工具时提示
warning apipost-tools > [email protected]: Doesn't work right
html-beautify
这个项目已经7年未更新了, 建议更换为 js-beautify
此外,根据 build:更新依赖包版本,将一些未使用的包去除 似乎还可以删除 rollup-plugin-terser
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.