@svta/common-media-library
    Preparing search index...

    Function appendCmcdHeaders

    • Beta

      Append CMCD query args to a header object.

      Parameters

      • headers: Record<string, string>

        The headers to append to.

      • cmcd: Cmcd

        The CMCD object to append.

      • Optionaloptions: CmcdEncodeOptions

        Encode options.

      Returns Record<string, string>

      The headers with the CMCD header shards appended.

      const headers = {
      hello: 'world',
      };

      const data = {
      br: 1000,
      };

      deepEqual(appendCmcdHeaders(headers, data), {
      hello: 'world',
      ['CMCD-Object']: 'br=1000',
      });