postman非常吃内存,rest工具就是一个页面,非常简单实用
rest-client
-
在项目目录新增rest-api.http文件
-
post请求
POST {{host}}/operation/partner/orderlist Accept: application/json, text/plain, */* Cache-Control: no-cache Content-Type: application/json;charset=UTF-8 Token: {{cmsToken}} { "page": 1, "pagesize": 20, "position": 1 }
-
发送文件
######################upload
POST {{host}}/pub/upload
Cache-Control: no-cache
token: 1750d42e5cf1a956ef2e3cd9e4a338fa
Content-Type: multipart/form-data; boundary=WebAppBoundary
--WebAppBoundary
Content-Disposition: form-data; name="file"; filename="timg.jpeg"
< /Users/ocean.z/Downloads/timg.jpeg
--WebAppBoundary--
- application/x-www-form-urlencoded
#########################application/x-www-form-urlencoded
POST {{host}}/cart/callback/pay
Accept: application/json, text/plain, */*
Cache-Control: no-cache
Content-Type: application/x-www-form-urlencoded
data=xx
&sign=xx
&time=xx
&partner_id=xx