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

**URL:** <https://discuss.elastic.co/t/what-is-difference-data-binary-and-d/146867>\
**Category:** Elasticsearch\
**Created:** [August 31, 2018, 12:44pm UTC](https://discuss.elastic.co/t/what-is-difference-data-binary-and-d/146867 "2018-08-31T12:44:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![da02d4d6e86247f19849](https://avatars.discourse-cdn.com/v4/letter/d/7ea924/32.png) [@da02d4d6e86247f19849](https://discuss.elastic.co/u/da02d4d6e86247f19849)\
**Post date:** [August 31, 2018, 12:44pm UTC](https://discuss.elastic.co/t/what-is-difference-data-binary-and-d/146867/1 "2018-08-31T12:44:29Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![danielmitterdorfer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielmitterdorfer/32/110510_2.png) [@danielmitterdorfer](https://discuss.elastic.co/u/danielmitterdorfer)\
**Post date:** [September 7, 2018, 3:11pm UTC](https://discuss.elastic.co/t/what-is-difference-data-binary-and-d/146867/2 "2018-09-07T15:11:17Z")

</div>

Hi,

please see [`man curl`](https://linux.die.net/man/1/curl):

```auto
-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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 5, 2018, 3:11pm UTC](https://discuss.elastic.co/t/what-is-difference-data-binary-and-d/146867/3 "2018-10-05T15:11:19Z")

</div>

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