Skip to content
Advertisement

Nodejs Parse fetch response containing object [Symbol(map)]

I do not know how to access the parameter x-error-detail-header.

I receive this response headers from a request using node-fetch npm package:

JavaScript

My problem is that I do not know how to access the parameters that are inside [Symbol(map)] object.

Advertisement

Answer

It is a Headers object. It has e.g. get and forEach methods. For example:

JavaScript

Note the case insensitivity.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement