[Gambas-user] gb.net.curl How to upload binary files
Ulf Wedemeyer SpamOk
spamok at ...1273...
Thu Feb 21 20:42:26 CET 2013
Hello Gambas experts
I have been working on a small project syncing data with Google through their
data API.
Most of the communication works well using the HttpClient from the gb.net.curl
component, but I struggling to get mimic the following curl command line.
curl --silent --request POST --data-binary "@sweeping_the_rock.png" \
--header "Slug: Sweeping the rock" --header "Content-Type: image/png" \
--header "Authorization: GoogleLogin auth=ABCDEFG"
"http://picasaweb.google.com/data/feed/api/user/brad.gushue/albumid/5113621341847124417"
I don't want to open the file and read fully first, as it can become rather
large, so I prefer to read it /pipe to the curl stream.
Currently I reverted to using the Shell command but I consider that only a
workaround with a curl component already existing.
A small code snipplet would be great help.
Thanks a lot in advance.
Ulf
More information about the User
mailing list