【问题标题】:postman post request for Azure FormRecognizer does not workAzure FormRecognizer 的邮递员发布请求不起作用
【发布时间】:2021-03-24 20:04:15
【问题描述】:

我正在尝试按照说明here 分析表单。我已经训练了一个模型,并且在我使用 python 代码时它可以工作。现在,我也希望能够根据postman 获得结果,但它不起作用。

您可以在此处查看我的发帖请求:

如您所见,我添加了Content-TypeOcp-Apim-Subscription-Key。然而,我没有得到任何json 作为答案,尽管我得到了status: 202 Accepted

谁能告诉我,我做错了什么?

提前致谢,

【问题讨论】:

    标签: azure post postman form-recognizer azure-form-recognizer


    【解决方案1】:

    如果您收到代码为202 Accepted 的响应,则表示 Azure 已接受您的请求并开始识别您的图像。

    在响应头中,会有一个名为:operation-location 的 URL

    您可以通过此 URL 获得您请求的结果:

    【讨论】:

    • 感谢您的回答。它以某种方式帮助了我。但是现在,我有另一个问题。当我使用您介绍的其他 url 时,我得到The file submitted couldn't be parsed. This can be due to one of the following reasons: the file format is not supported ( Supported formats include JPEG, PNG, BMP, PDF and TIFF), the file is corrupted or password protected.,尽管可以使用 python 代码分析该文件。
    • 很奇怪,我以前没有遇到过这种错误,能否请您分享您的整个请求和图像,以便我可以重现此问题?
    【解决方案2】:

    还请使用以下参考 REST API,因为原始消息中的链接共享适用于已弃用的 Form Recognizer v1 版本。请使用表单识别器 v2 或 v2.1 版本。

    Form Recognizer v2.1 release REST API reference

    Form Recognizer v2.0 release REST API reference

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-07-12
      • 2021-11-07
      • 2021-03-08
      • 2019-10-01
      • 2019-03-01
      • 1970-01-01
      • 2019-03-03
      • 2021-12-04
      相关资源
      最近更新 更多