IDEA自带接口测试工具(http client)

方法一

1、打开自己的项目

2、项目中新建http目录,目录下新建test.http文件(test可以自己命名)

3、查看http自带请求

打开ides:File---->Settings---->Editor---->Live Templates---->HTTP Request

IDEA自带接口测试工具(http client)

这里就可以看到get和post的请求

4、直接test.http文件中输入以上请求组中的请求,eg:gtr。这个gtr就是get请求,修改成自己正确的端口和接口地址

IDEA自带接口测试工具(http client)

IDEA自带接口测试工具(http client)

5、顶级左边绿色三角形运行即可

IDEA自带接口测试工具(http client)

方法二(类似postman)

IDEA自带接口测试工具(http client)

IDEA自带接口测试工具(http client)