Byron / google-apis-rs

A binding and CLI generator for all Google APIs
http://byron.github.io/google-apis-rs
Other
1.02k stars 135 forks source link

URL encoding query parameters #467

Closed andrewbaxter closed 8 months ago

andrewbaxter commented 8 months ago

In storage, if you try to send a request for object a/b it fails with a 404. Manually url-encoding the object key before making the request solves the issue.

I see in the code it's using Params which has a flag to optionally encode parameters. This is disabled for "object" in the storage library, but it doesn't look like the list of escaped characters includes / even if it were enabled.

Do you recall the history of decisions regarding url encoding? My naive assumption would be to always url encode all parameters using something like urlencoding. If there's nothing blocking it I'd be happy to make an MR.