Skip to content

Feature parity between Storage client and other clients #3615

@dbolduc

Description

@dbolduc

The google_cloud_storage::client::Storage uses a reqwest::Client directly in its implementation instead of using gaxi::http::ReqwestClient like the GAPICs do.

I think I missed the discussion on why we chose to do this, but at a guess it is because Storage is the only client that does HTTP streaming, so there was no need to build that into the common gaxi layer.

The consequence is that we are missing some common features handled by the gaxi layer. Such as:

  • Calculating and setting the Host: header.
    • This is required to use a client in a private network such as VPC-SC.
  • Cloud client library instrumentation for HTTP transport.
  • User-Agent: header.
  • etc. (this list may grow over time too)

We will need to do some level of refactoring to resolve this. It looks like either:

  • add streaming support to gaxi::http::ReqwestClient, and use that from within google-cloud-storage
  • OR factor out configuration of a reqwest builder given options, and call into it from google-cloud-storage

Metadata

Metadata

Assignees

Labels

api: storageIssues related to the Cloud Storage API.priority: p3Desirable enhancement or fix. May not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions