Mislav Marohnić
288d01318b
Respect the hostname of current repository in queries
2020-07-23 22:31:08 +02:00
Mislav Marohnić
74a39f3ed1
Turns out we do need explicit Content-Length for file uploads
...
This reverts commit 141388fd23 .
2020-06-10 18:18:49 +02:00
Mislav Marohnić
b099bb3037
api command: accept full URLs as path input
...
This is to allow file uploads to `https://uploads.github.com `
2020-06-10 16:26:23 +02:00
Mislav Marohnić
7033021637
gh api: fix passing file/stdin contents via field arguments
...
Reading from file via `-F foo=@myfile.txt` syntax would result in
`[]byte` Go type, which by default gets serialized to JSON in base64
format, which we don't want here.
Traverse all parameters and convert any `[]byte` into `string` before
JSON serialization.
2020-06-03 16:00:52 +02:00
Mislav Marohnić
f58e0bf710
Add api tests
2020-05-20 15:21:32 +02:00
Mislav Marohnić
7ffbde3e12
Allow setting multiple values for a request header
2020-05-20 15:21:31 +02:00
Mislav Marohnić
90fa193eaf
Promote api command to a pkg/cmd/api package
2020-05-20 15:21:31 +02:00