Hello,
I am trying to find out how to write something, using libcurl, to do
some io with a minio object store (s3 compatible)
I did go a bit through the examples page (some I have used as een
example for other projects), but could really find what I was looking
for. I did find a script that uses curl (the command) that seems to work
this is a code fragment, for what I try to write into C.
# Static Vars
DATE=$(date -R --utc)
CONTENT_TYPE='application/zstd'
SIG_STRING="GET\n\n${CONTENT_TYPE}\n${DATE}\n${MINIO_PATH}"
SIGNATURE=`echo -en ${SIG_STRING} | openssl sha1 -hmac ${PASSWORD}
-binary | base64`
PROTOCOL="https"
curl --insecure \
-o "${OUT_FILE}" \
-H "Host: $URL" \
-H "Date: ${DATE}" \
-H "Content-Type: ${CONTENT_TYPE}" \
-H "Authorization: AWS ${USERNAME}:${SIGNATURE}" \
${PROTOCOL}://$URL${MINIO_PATH}
I saw an example called httpcustomheader, which came closest to what I'm
looking for I think.
thanks,
Ron
--
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette: https://curl.se/mail/etiquette.html