1

私のURLは次のようなものです:

https://<ip:port>/TestRESTServices/objects/test-folder

渡したいJSONデータは次のとおりです。

{
   "name":"test-1",
   "parent-uuid":"126"
}

test-1 は作成したいフォルダ名です。POST 経由で firefox の Poster プラグインのデータを使用してこの URL を呼び出すと、正常に動作し、フォルダー test-1 が作成されます。

 //using Content Type : "application/json"

cURL を使用してこの REST API を呼び出す/呼び出すにはどうすればよいですか? 助けが必要。

これは私が試したものです:

 curl -i -H "Accept: application/json" -X POST -d '{"name":"test-1","parent-uuid":"126"}' https://<ip:port>/TestRESTServices/objects/test-folder

それはエラーをスローしますcurl: (52) Empty reply from server

4

1 に答える 1