cURLの使用法について簡単な質問があります。明確な答えを得るために、Google検索またはManページで多くを見つけることができませんでした。
ここでは、ファイル/添付ファイルの送信と送信の--dataどちらを使用するかについて説明します。主な違いは何で、どのシナリオでVS--formを選択するのか知りたいです。--data-binary--form
POSTの「本文」は、または次のいずれ--data (for application/x-www-form-urlencoded)か--form (for multipart/form-data)を介して送信できます。
-F "foo=bar" # 'foo' value is 'bar'
-F "foo=<foovalue.txt" # the specified file is sent as plain text input
-F "foo=@foovalue.txt" # the specified file is sent as an attachment
-d "foo=bar"
-d "foo=<foovalue.txt"
-d "foo=@foovalue.txt"
-d "@entirebody.txt" # the specified file is used as the POST body
--data-binary "@binarybody.jpg"