Skip to main content
richardn0002
January 25, 2023
Solved

Has anyone successfully implemented eTag as a header on a GET request?

  • January 25, 2023
  • 4 replies
  • 0 views

We're trying to implement an eTag to reduce query time to a remote API.  They've provided support on their end and are generating an ETag,  a subsequent GET by us, with an ETag header doesn't seem to generate the response I'd hoped, and  before I go back to the vendor, I wondered if there was something tricky in the way the quotes need to be created around the ETag string?

    Best answer by stefanhelzle0001

    That's a nice documentation .... in my experience, header values typically do not include the quotes.

    4 replies

    stefanhelzle0001
    Brainy
    January 25, 2023

    Can you provide a few more details? An ETag is just a string. What do you mean with tricky quotes?

    richardn0002
    January 25, 2023

    Sure,  when I read the documentation regarding implementation,  the surrounding quotes seem fluid,  so I was wondering if there was something tricky I was missing.  For example:

    The Mozilla Developer doc page gives these two examples:

    ETag: W/""
    ETag: ""



    So it's not clear to me if I need to be padding this with surrounding char(34) values, leave it as a bare string, etc...

    stefanhelzle0001
    Brainy
    January 25, 2023

    That's a nice documentation .... in my experience, header values typically do not include the quotes.