【问题标题】:Post data on Kinvey DataStore with Business Logic使用业务逻辑在 Kinvey DataStore 上发布数据
【发布时间】:2013-08-29 09:59:50
【问题描述】:

我刚开始使用 Kinvey,但在通过 REST api 发布数据时遇到了一些问题。 如果我进入数据存储区,我可以保存它,但通过 POST 发送时它不起作用。

要发布数据,我使用 URL "/appdata/APP_KEY/DATASTORE/" 并发送 AuthorizationX-Kinvey-API-Version 标题中的 Content-Type
我回来了“在处理业务逻辑代码时发生了未知的内部错误。”

当我使用 App Engine 添加业务逻辑时(有一段时间,它只是将 status=200 返回给 Kinvey),我遇到了同样的错误:

{
  "error": "BLInternalError",
  "description": "The Business Logic script did not complete. See debug message for details.",
  "debug": "An unknown internal error occured in the processing of the Business Logic code."
}

有人知道我哪里做错了吗?

最后,即使我通过 GET 调用 Kinvey,Kinvey 调用 App Engine 的方法是 POST,有没有办法改变它?

尽管有错误,但我始终在 Google App Engine 中有访问日志。

谢谢!

【问题讨论】:

    标签: google-app-engine rest kinvey


    【解决方案1】:

    我向 Kinvey 支持部门发送了一封电子邮件,他们帮了我很多忙。 我的一些错误:

    1. 我返回的 JSON 错误 [*];
    2. 我没有在响应的标题中添加 Content-Type 和状态。

    现在完美运行了!

    [*] 我在响应正文中发回的 JSON 是:

    {
        "request": {
            "method": "<redacted>",
            "username": "<redacted>",
            "entityId": "<redacted>",
            "collectionName": "<redacted>",
            "headers": {
                "connection": "<redacted>",
                "host": "<redacted>",
                "x-forwarded-for": "<redacted>",
                "x-forwarded-port": "<redacted>",
                "x-kinvey-api-version": "<redacted>",
                "x-real-ip": "<redacted>",
                "authorization": "<redacted>",
                "x-forwarded-proto": "<redacted>"
            },
            "body": "<redacted>",
            "params": "<redacted>"
        },
        "response": {
            "complete": True,
            "headers": {
                "x-powered-by": "<redacted>",
                "x-kinvey-api-version": "<redacted>",
                "x-kinvey-request-id": "<redacted>"
            },
            "body": {},
            "error": None,
            "statusCode": 200
        }
    }
    

    再次感谢 Brian 对 Kinvey 的支持!

    []的

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-12-02
      • 1970-01-01
      • 2019-05-08
      • 2011-10-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-05-18
      相关资源
      最近更新 更多