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

推荐订阅源

B
Blog RSS Feed
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google Online Security Blog
Google Online Security Blog
Hugging Face - Blog
Hugging Face - Blog
博客园 - Franky
Last Week in AI
Last Week in AI
MongoDB | Blog
MongoDB | Blog
T
Tailwind CSS Blog
云风的 BLOG
云风的 BLOG
Vercel News
Vercel News
博客园 - 三生石上(FineUI控件)
腾讯CDC
The GitHub Blog
The GitHub Blog
V
Visual Studio Blog
N
News | PayPal Newsroom
M
MIT News - Artificial intelligence
C
CERT Recently Published Vulnerability Notes
Apple Machine Learning Research
Apple Machine Learning Research
雷峰网
雷峰网
A
Arctic Wolf
The Cloudflare Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
C
Cyber Attacks, Cyber Crime and Cyber Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
AI
AI
S
Security @ Cisco Blogs
aimingoo的专栏
aimingoo的专栏
Cloudbric
Cloudbric
爱范儿
爱范儿
罗磊的独立博客
Y
Y Combinator Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Attack and Defense Labs
Attack and Defense Labs
Webroot Blog
Webroot Blog
T
Threatpost
T
Threat Research - Cisco Blogs
Cisco Talos Blog
Cisco Talos Blog
Recorded Future
Recorded Future
Security Latest
Security Latest
P
Proofpoint News Feed
www.infosecurity-magazine.com
www.infosecurity-magazine.com
I
Intezer
H
Heimdal Security Blog
Blog — PlanetScale
Blog — PlanetScale
S
Securelist
Forbes - Security
Forbes - Security
Application and Cybersecurity Blog
Application and Cybersecurity Blog
WordPress大学
WordPress大学
Engineering at Meta
Engineering at Meta
H
Hackread – Cybersecurity News, Data Breaches, AI and More

博客园 - 汉克书

新工作新气象 记录一些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"
}