-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcurler.sh
executable file
·12 lines (7 loc) · 1.91 KB
/
curler.sh
1
2
3
4
5
6
7
8
9
10
11
echo token is $1
echo document is $2
#echo initiate document directly at google ; curl -i -H "Content-Type: text/plain" -H "X-Upload-Content-Length: 30" -H "X-Upload-Content-Type: text/plain" -H "Origin: http://myfavouritesandwich.org" -H "GData-Version: 3.0" -H "Authorization: Bearer $1" -H "Slug: remoteStorage-curl" -H "Content-Length: 0" -X POST -d "" https://docs.google.com/feeds/default/private/full?convert=false
echo initiate document directly at google ; curl -i -H "Content-Type: text/plain" -H "X-Upload-Content-Length: 30" -H "X-Upload-Content-Type: text/plain" -H "Origin: http://myfavouritesandwich.org" -H "GData-Version: 3.0" -H "Authorization: Bearer $1" -H "Slug: remoteStorage-curl" -H "Content-Length: 0" -X POST -d "" https://docs.google.com/feeds/default/private/full
#echo initiate document through proxy ; curl -i -H "Content-Type: text/plain" -H "X-Upload-Content-Length: 30" -H "X-Upload-Content-Type: text/plain" -H "origin: http://myfavouritesandwich.org" -H "GData-Version: 3.0" -H "Authorization: Bearer $1" -H "Slug: remoteStorage-curl" -H "Content-Length: 0" -X POST -d "" http://myfavouritesandwich.org:9002/feeds/default/private/full
#echo post to document directly at google ; curl -i -H "Content-Range: bytes 0-29/30" -H "Content-Type: text/plain" -H "X-Upload-Content-Length: 30" -H "X-Upload-Content-Type: text/plain" -H "origin: http://myfavouritesandwich.org" -H "GData-Version: 3.0" -H "Authorization: Bearer $1" -H "Slug: remoteStorage-curl" -H "Content-Length: 30" -X PUT -d "123456789012345678901234567890" https://docs.google.com/feeds/default/private/full/document%3A$2
#echo put to document directly at google ; curl -i -H "Content-Range: bytes 0-29/30" -H "Content-Type: text/plain" -H "Content-Length: 30" -H "Origin: http://myfavouritesandwich.org" -X PUT -d "123456789012345678901234567890" https://docs.google.com/feeds/default/private/full/document%3A1AGkSTWNlXm9DcvnC673PtTpFuntOuMBHZKhMKiVxNX4