Translation of Curl command to HTTP Request

you need to declare msg.headers as an object
add

msg.headers = {}; 

before the other references to msg.headers.

1 Like