fdk-node icon indicating copy to clipboard operation
fdk-node copied to clipboard

ctx.headers returns values are array inside array

Open rde2 opened this issue 6 years ago • 0 comments

In the node.js fn handler, the ctx parameter headers property returns:

get headers () { let headers = {} for (let k in this._headers) { if (this._headers.hasOwnProperty(k)) { headers[k] = new Array(this._headers[k]) } } return headers } However _headers[k] is already an array, so to get the value for a header you need:

ctx.headers["Content-type"][0]0] which does not seem right.

rde2 avatar Sep 17 '19 16:09 rde2