1
Windowsで次のcurlコマンドを実行しています。コマンドは実行されますが、カールはファイル本体を追加しません。これは、ヘッダを書き込みのみ:リクエスト送信curl.exeでファイルの本文が追加されない
curl.exe -H "Authorization: Bearer very-secret-stuff" -F [email protected]:/almostEmpty.txt --verbose https://to-this-address
:
POST /api/rest/v5/transientDocuments HTTP/1.1
Host: api.eu1.echosign.com
User-Agent: curl/7.56.1
Accept: */*
Authorization: Bearer very-secret-stuff
Content-Length: 214
Content-Type: multipart/form-data; boundary=------------------------e84a74f3e81c968e
***Nothing here. The file body is actually missing***
は、応答を受信し:
HTTP/1.1 400 Bad Request
Date: Wed, 08 Nov 2017 12:28:00 GMT
Server: Apache
x-request-id: 613647cc-c04b-49d7-8b86-62fc65841a8a
Cache-Control: no-cache, no-store, must-revalidate
Pragma: no-cache
Expires: 0
Content-Length: 61
Strict-Transport-Security: max-age=31536000;
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Robots-Tag: none
P3P: CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"
Connection: close
Content-Type: application/json;charset=UTF-8
{"code":"NO_FILE_CONTENT","message":"Must provide file body"}
Closing connection 0
TLSv1.2 (OUT), TLS alert, Client hello (1):
file = @ E:/almostEmpty.txt:バックスラッシュ「\」ではないですか? \t ファイル= @のE:\ almostEmpty.txt \t ファイル= @のE:\\ almostEmpty.txt が常に同じ結果 – Juan
は、すでにすべての組み合わせを試してみましたか? – Spanky
は "" の間に置く – Juan