我正在尝试从 url 运行 newman 与邮递员集合,如此链接中所述。
newman run http://localhost:62254/api/postman
唯一的问题是 url 在 Windows 身份验证下,所以我收到 401 未经授权的响应,导致 newman 失败并出现以下错误。
the url "http://localhost:62254/api/postman" did not provide valid JSON data
我尝试通过如下所示的请求传递凭据。但它没有用。
http://username:password@localhost:62254/api/postman
如果我使用"NTLM 身份验证"功能直接使用邮递员命中端点,它可以正常工作。但我不确定我是否可以将它与纽曼一起使用来获得收藏本身。
我们无法在邮递员/纽曼中找到任何选项。因此,最后我们使此URL单独(http://localhost:62254/api/postman(在Web服务器中对匿名身份验证开放。