raml-javascript-generator icon indicating copy to clipboard operation
raml-javascript-generator copied to clipboard

Global "header"s wiped on "extend"

Open wilkohein opened this issue 7 years ago • 1 comments

Global headers provided on client init do not work. Reason: Every function call uses something like {code} var options = extend({ body: body, headers: {} }, opts) {code} i.e. forcefully defines a "headers" attribute. On the used "xtend" version of extend this is therefore overriding any global options set: {code} var options = extend({}, client._options, opts) {code}

Resolution: Use version of "extend" supporting recursive extension.

wilkohein avatar Jan 16 '17 10:01 wilkohein

@wilkohein, can you contact me on christian dot vogel at mulesoft dot com? I saw your new implementation or fork and I wasn't able to raise any issues. Like to speak to you about that :)

sichvoge avatar Mar 09 '17 15:03 sichvoge