Can I use setHeader
to set an new header?
Or Do I need to addHeader
first, then use setHeader
method?
Advertisement
Answer
The documentation says that you can add multiple values to a particular header using the addHeader
method, whereas an initial value would be overwritten if you use the setHeader
method.
In both cases a non-existent header would be created.