What is difference --data-binary and -d?

i can't understand what is difference of two way.

when i use /_bulk api,
--data-binary @bulk.txt is ok but,
-d @bulk.txt is fail.

Hi,

please see man curl:

-d/--data <data>
(HTTP) Sends the specified data in a POST request to the HTTP server, in the same way that a browser does when a user has filled in an HTML form and presses the submit button. This will cause curl to pass the data to the server using the content-type application/x-www-form-urlencoded. Compare to -F/--form.
-d/--data is the same as --data-ascii. To post data purely binary, you should instead use the --data-binary option. To URL-encode the value of a form field you may use --data-urlencode.

--data-binary <data>
(HTTP) This posts data exactly as specified with no extra processing whatsoever.

Daniel

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.