smartystreets / smartystreets-ruby-sdk

The official client libraries for accessing SmartyStreets APIs from Ruby
https://smartystreets.com/docs/sdk/ruby
Apache License 2.0
23 stars 25 forks source link

Add support for ETag header to us-address-enrichment-api #53

Open RyanLCox1 opened 1 month ago

RyanLCox1 commented 1 month ago

The ETag header provides the ability to check if a record has been updated since the last query.

Every query to the API will return an ETag header which represents a hash of the record in the response. This value may be stored and used in subsequent queries for that same record.

If the record data has NOT been updated since the last query, it will return a 304 (Not Modified) and the client will not be charged for the query. (The 304 response does not contain a body.)

If the record data HAS been updated, the latest version of the record will be returned along with a new ETag value.

Important: Only the latest ETag value is valid for each record. This feature is NOT designed to retrieve past record versions. Also note that the ETag value will change if ANY data in the record has been updated, regardless of which attributes are requested using the include and exclude parameters.

The Ruby sdk needs this header added.