Closed sytpb closed 3 years ago
请提供一下postman的版本?
8.0 不行,后来升级到8.1 也是一样的。
用这个方法试试 File/+号 -> import -> raw file
我试了下,可以导入的。
方法:点击 Import 选择Raw text
,然后输入
curl --location --request https://raw.githubusercontent.com/wechatpay-apiv3/wechatpay-postman-script/master/wechatpay-apiv3.postman_collection.json
点击Continue
我试了用raw text 输入,但是还是报一个错,如上图。。
这样子不行?
是的。我就这么干的。 复制 粘帖,continue 对吧?
输入框填curl命令,或者把下载后得到的json贴进去都可以。如果不行,看看是不是你的网关拦截了导致内容被修改了。
或者你使用的占位提示来测试下
curl --location --request GET http://postman-echo.com/get
curl --location --request GET http://postman-echo.com/get 这个测试没有问题
curl --location --request GET https://raw.githubusercontent.com/wechatpay-apiv3/wechatpay-postman-script/master/wechatpay-apiv3.postman_collection.json
这样吧,可能是postman不同版本或者不同环境下使用的不同的curl版本有差别?GET是默认方法,漏掉method在我postman 8.1.0 macos上是可以的,可能你那边不行。
这个可以了,但是我的collection 里怎么是空的?
囧,我搞错了!
方法1:还是老办法,导入文件
可以看到是这样子
方法2:把整个文件复制粘贴到raw text也可以。