Rest http api post request

When I was doing a similar thing, my flow worked 100% once I added msg.header = {} to declare msg.headers as an object before defining . See this post here