К конкретному символу @
. От man curl
:
--data-binary <data>
(HTTP) This posts data exactly as specified with no extra processing whatsoever.
If you start the data with the letter @, the rest should be a filename. Data is
posted in a similar manner as --data-ascii does, except that newlines are preserved
and conversions are never done.
If this option is used several times, the ones following the first will append data
as described in -d, --data.
Кажется, не о чем беспокоиться @
Как уже упоминалось @ chinsoon12, httr
- хороший хороший метод для обработки запроса:
-X
или --request
переводит в VERB
функцию POST()
, которая включает --data-binary
-H
или --header
переводится в add_headers()
, но есть специальные функции для настройки типа контента (см. Ниже)
Так это выглядит так:
library(httr)
response <- POST(
url = "https://some.url.com/invocations",
body = upload_file(
path = path.expand("data/data.csv"),
type = 'text/csv'),
verbose()
)
# get response and write to you disk