int128 / gpup

A command to upload photos and movies to Google Photos Library using the official Google Photos Library API
Apache License 2.0
221 stars 22 forks source link

Add header and basic auth support on fetch URLs #16

Closed int128 closed 6 years ago

int128 commented 6 years ago
% go run main.go --debug --request-header=x-foo:bar --request-header=x-foo:baz --request-auth=alice:bob https://www.example.com/image.jpg
2018/09/17 03:15:05 The following 1 items will be uploaded:
  1: https://www.example.com/image.jpg
2018/09/17 03:15:05 Using token in ~/.gpupconfig
2018/09/17 03:15:05 Queued 1 item(s)
2018/09/17 03:15:05 [REQUEST] GET https://www.example.com/image.jpg
GET /image.jpg HTTP/1.1
Host: www.example.com
User-Agent: Go-http-client/1.1
Authorization: Basic YWxpY2U6Ym9i
X-Foo: bar
X-Foo: baz
Accept-Encoding: gzip

2018/09/17 03:15:06 [RESPONSE] GET https://www.example.com/image.jpg
HTTP/2.0 404 Not Found