惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Hacker News - Newest:
Hacker News - Newest: "LLM"
AI
AI
T
Troy Hunt's Blog
GbyAI
GbyAI
H
Hacker News: Front Page
SecWiki News
SecWiki News
V2EX - 技术
V2EX - 技术
A
About on SuperTechFans
人人都是产品经理
人人都是产品经理
Hacker News: Ask HN
Hacker News: Ask HN
S
Secure Thoughts
Last Week in AI
Last Week in AI
MyScale Blog
MyScale Blog
L
LINUX DO - 最新话题
C
CERT Recently Published Vulnerability Notes
C
Cyber Attacks, Cyber Crime and Cyber Security
O
OpenAI News
S
SegmentFault 最新的问题
Y
Y Combinator Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
The Cloudflare Blog
P
Proofpoint News Feed
Engineering at Meta
Engineering at Meta
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
美团技术团队
Google DeepMind News
Google DeepMind News
Simon Willison's Weblog
Simon Willison's Weblog
Know Your Adversary
Know Your Adversary
K
Kaspersky official blog
T
The Exploit Database - CXSecurity.com
S
Securelist
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
B
Blog RSS Feed
L
Lohrmann on Cybersecurity
Spread Privacy
Spread Privacy
博客园 - 司徒正美
Stack Overflow Blog
Stack Overflow Blog
博客园 - Franky
The GitHub Blog
The GitHub Blog
B
Blog
F
Fortinet All Blogs
I
InfoQ
C
Check Point Blog
Webroot Blog
Webroot Blog
博客园 - 叶小钗
P
Privacy International News Feed
Latest news
Latest news
Forbes - Security
Forbes - Security
博客园 - 三生石上(FineUI控件)
N
News | PayPal Newsroom

博客园 - 汉克书

新工作新气象 记录一些skill的网站 重构代码的思路想法 内网服务器如何跟服务端通信 增加一下git提交记录的关键词 ai生成一段学习golang的select、context、go、channel的代码 水一篇博文 文件服务器对于devops的用处 git信息提交错误,进行修改 还是没啥东西写的,写点DevOps的想法 突然想了一些“思路”问题。提出的一些想法 就是想吐槽一下信创 mac和linux终端显示分支 继续一个日常 devops 这个月又没什么东西可以写的,就写个harbor的arm版本获取地方吧 写一个日常吧 docker 在x86运行arm容器 ansible的最佳实践 临时用的
这个月好像没啥可以写的,rest client
汉克书 · 2025-06-05 · via 博客园 - 汉克书

推荐一个vscode的插件rest client吧,其实网上已经很多了,我在整理一下

安装就是直接插件市场搜索一下

前提,这个插件对于自己开发比较好用,如果需要和别人合作,可能还需要编写swag文档且合作人员也需要学习这个工具的使用

和别人合作,还是用postman或者apifox吧,不要尝试去教别人

如何使用

文件名 http 结尾,或者 rest 结尾

例如我的文件

变量

我是写在 .vscode/settings.json 让其跟随代码进行,然后在vscode的界面,右下角原则域进行调试使用

settings.json 内容如下

{
    "rest-client.environmentVariables": {
        "local": {
            "url": "http://127.0.0.1:9001"
        }
        
    }
}

如何使用

  1. 用注释,进行分割接口
  2. json文件使用相对路径, 也可以直接编写json内容到代码中
  3. POST 请求和请求头content-type 不能空行,而data和content-type需要一个空行
GET {{url}}/api/v1/config HTTP/1.1

### 用注释,进行分割
POST {{url}}/api/v1/config
content-type: application/json

< json/config/config.json

### 用注释,进行分割
POST {{url}}/api/v1/config
content-type: application/json

{
  "config": "test"
}