Skip to content

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

@chuckwondo

Description

@chuckwondo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions