Use Weak Indicator for ETag in http-request node header

I need to set the weak indicator in the HTTP header of the http-request node.

The raw header should look like:


Note the leading W/ before the double quotes. This indicates a weak validation of the ETag. See:

I tried to add the header by a function node:

msg.headers = {};
msg.headers['If-Match'] = 'W/"JzE5OfC4OTI2MjglMTM1MjIWODgyMzcxOzAwOyc="';

This of course results in a wrong header formatting:

If-Match: "W/"JzE5OfC4OTI2MjglMTM1MjIWODgyMzcxOzAwOyc=""

I tried different ways of encoding the double quotes. But this does not work as W/ needs to be outside of the quoted value.

Is there a way to set the raw header of a http-request node?

Thank you for any help.

Reading the MDN specs the W/ is part of a response header sent in a response not a request header.
So would not be sent in the If-Match header.

Ok. Sending the ETag without the weak indicator works.

Thank you very much.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.