2015-08-13 30 views
-2

在我的Linux機器上從終端發出的CURL請求中是否有任何錯誤?我正在創建CURL請求中是否有任何錯誤?

curl -H 'token: 90006c4d3a0baba0677bc592ba6d8e6ae25e1b5589c0570904c217fcc5cf7aea' -X POST -d ' 
{ 
    "photo":[ 
     { 
     "fileURL":"https://www.filepicker.io/api/file/UYUkZVHERGufB0enRbJo", 
     "filename":"IMG_0004.JPG" 
     }, 
     { 
     "fileURL":"https://www.filepicker.io/api/file/WZeQAR4zRJaPyW6hDcza", 
     "filename":"IMG_0003.JPG" 
     } 
    ], 
    "status_info":"WS test status for Photo", 
    "group_id":181 
}' http://54.174.50.242/api/feed/addPhotos 

請求必須採用有效的JSON格式。 JSON驗證或任何其他問題有問題嗎? 請幫幫我。

+1

爲什麼不通過執行它找出? – Epodax

+1

它工作嗎?如果不是,你會得到什麼錯誤?根據[JSONlint](http://jsonlint.com/),json是有效的。 – DevDonkey

+0

你有沒有得到任何錯誤? – DocRattie

回答

-1
yes it's fine. but i think you should use it after make array. 

    enter code here 


{ 
    "array": [ 
    { 
     "photo": [ 
     { 
      "fileURL": "https://www.filepicker.io/api/file/UYUkZVHERGufB0enRbJo", 
      "filename": "IMG_0004.JPG" 
     }, 
     { 
      "fileURL": "https://www.filepicker.io/api/file/WZeQAR4zRJaPyW6hDcza", 
      "filename": "IMG_0003.JPG" 
     } 
     ], 
     "status_info": "WS test status for Photo", 
     "group_id": 181 
    } 
    ] 
}