记录个很奇葩的问题,idea的restFulClient使用过程中接口调用问题。
1. 问题描述
请求信息
General
Request URL: http://adressit.hello.com/adsytfs-view-web/industry/industry_analysis_getSecondCatalog.htm
Request Method: POST
Status Code: 200 OK
Remote Address: 10.37.128.93:80
Referrer Policy: no-referrer-when-downgrade
requestHead
前后省略...
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryh8gNoeFNQEhxS0Bg
2. 解决方案
restFulClient信息
### 接口
POST {{ host }}/adsytfs-view-web/industry/industry_analysis_getSecondCatalogs.htm?firstCatalog=2001
Accept: application/json, text/plain
Accept-Language: zh-CN,zh;q=0.9
Connection: keep-alive
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary0klQaaXACczRQKJt
Cookie:JSESSIONID...
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36
## 这个必须写否则接收不到参数,但是不需要赋值,取值是请求路径URL问好之后拼接的值,?firstCatalog=2001
## 也就是请求路径URL问好之后拼接需要,这个也需要
{
"firstCatalog": ""
}