chavyleung / chavyleung/scripts
[Env.js] 有考虑增加更多兼容处理吗?
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 5.5k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
目前我观察到两点值得改进的
- 添加
$.request和$.response用以处理不同工具 headers 的 key 大小写不同的问题。例如Loon都是小写,而QX是大小写都有。以及$request.status、$request.statusCode、$request.path等差异字段。 $.done()方法在请求阶段返回虚假响应时,不同工具需要传入的参数不同。例如Loon是$.done({response: {status: 302}}),而QX是$.done({status: "HTTP/1.1 302 Found"})。在响应阶段修改响应时,Loon是$.done({status: 200}),而QX是$.done({status: "HTTP/1.1 200 OK"})。
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading Env.js and trace the existing $.done() handling and request/response fields. Compare the Loon and QX forms described in the issue; done should provide compatible request and response aliases and accept the documented status formats across both tools.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100