Skip to content

gh api: fix passing file/stdin contents via field arguments#1093

Merged
mislav merged 1 commit intotrunkfrom
api-file
Jun 4, 2020
Merged

gh api: fix passing file/stdin contents via field arguments#1093
mislav merged 1 commit intotrunkfrom
api-file

Conversation

@mislav
Copy link
Copy Markdown
Contributor

@mislav mislav commented Jun 3, 2020

Reading from file via -F [email protected] 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.

Followup to #909

Reading from file via `-F [email protected]` 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.
@mislav mislav merged commit 24ca449 into trunk Jun 4, 2020
@mislav mislav deleted the api-file branch June 4, 2020 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants