我正在制作的CURL请求中有任何错误吗?

时间:2015-08-13 10:45:06

标签: php json curl request

我从Linux机器上的终端发出的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 个答案:

答案 0 :(得分:-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
    }
  ]
}