当我通过 powershell 向 rest api Postmarkapp 发送请求时,我遇到了这些错误
使用方法获取时
Invoke-RestMethod : Cannot send a content-body with this verb-type.
使用metod post时
Server Error in '/' Application. The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /deliverystats
脚本
$Uri = 'https://api.postmarkapp.com/deliverystats'
Invoke-RestMethod $Uri -Method Post -Headers @{'X-Postmark-Server-Token' =" Token" } -ContentType "application/json" |