Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide convenience method for adding a client-id header #49

Open
chuckwondo opened this issue May 11, 2024 · 0 comments
Open

Provide convenience method for adding a client-id header #49

chuckwondo opened this issue May 11, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@chuckwondo
Copy link
Collaborator

chuckwondo commented May 11, 2024

The Headers section of the CMR Search API documentation describes the Client-Id header as follows:

Client-Id - Indicates a name for the client using the CMR API. Specifying this helps Operations monitor query performance per client. It can also make it easier for them to identify your requests if you contact them for assistance.

Given that there are token and bearer_token methods in the Query class for conveniently setting the Authorization header, providing a client_id method would be convenient for supplying the Client-Id header.

Further, I recommend the following:

  • When the user does not invoke the client_id method to specify their own chosen ID for identification for assistance, a default should be set. I recommend something like this: python_cmr-vX.Y.Z, where X.Y.Z is the version of python_cmr
  • When the user does invoke the client_id method, the following suffix should be added to the value specified by the user: (python_cmr-vX.Y.Z), with a space character between the user-supplied value and the suffix.
@frankinspace frankinspace added the enhancement New feature or request label May 13, 2024
@chuckwondo chuckwondo added the good first issue Good for newcomers label May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants