3

curl を使用してアプリへの POST を実行しようとしています。インライン データとファイルのデータを使用してデータを作成したいのですが、できません。

それが可能かどうか誰でも知っていますか?

これが私が試しているコードの例です:

curl -i -X POST http://localhost:3000/admin/articles -H "Content-Type: application/json" --data '{"article": {"issue_id": "1", "title": "hello", "translations_attributes": {"0": {"locale": "en", "id": "", "content": @file.json}}}}'
4

1 に答える 1