2013-08-29 59 views
0

我剛開始與Kinvey合作,並且遇到一些問題需要通過REST API進行數據發佈。 如果我進入數據存儲區,我可以保存它,但通過POST發送時不起作用。在Kinvey DataStore上發佈有關業務邏輯的數據

要發佈的數據,我使用的URL 「/應用程序數據/ APP_KEY/DATASTORE /」和發送授權X-Kinvey-API的版本內容Typein的頭
然後我回來「處理業務邏輯代碼時發生未知內部錯誤。」

當我加入我的業務邏輯與App Engine(一會兒,它只是返回狀態= 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中擁有訪問日誌。

謝謝!

回答

1

我發送了一封電子郵件給Kinvey的支持,他們幫了我很多。 我的一些錯誤:

  1. 我返回的JSON是錯誤的[*];
  2. 我沒有在我的回覆的標題中添加內容類型和狀態。

現在它完美的工作!

[*]我在響應主體所發回的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支持!

[]的