googleapis / googleapis/google-cloud-rust

Fields of `bytes` should be percent-encoded as query parameters

Open
#2,198 3 comments 0 reactions 0 assignees View on GitHub
external type: cleanup
Dominant language
Rust
Stars
955
Forks
144
Avg merge
1d 5h
Merged PRs (30d)
279

Description

To send query parameters of type "object" we serialize the object as JSON and send expand the parameters:

https://github.com/googleapis/google-cloud-rust/blob/0b3d43254520095682b9717643d0b37de218a371/generator/internal/rust/codec.go#L694-L702

The resulting code looks like so:

https://github.com/googleapis/google-cloud-rust/blob/0b3d43254520095682b9717643d0b37de218a371/src/generated/showcase/src/transport.rs#L115-L124

Consequently fields of type `bytes` are base64-encoded. Looking at how [showcase](https://github.com/googleapis/gapic-showcase/blob/60f4159fbf6474304c8b0c088c28e77647763e83/util/genrest/resttools/populatefield.go#L166-L167) works, it seems that these should be percent-encoded (which makes sense for query parameters).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.