Http-request headers

The terms of service for the API I'm accessing, yr.no say, amongst other requirements:

All requests must (if possible) include an identifying User Agent-string (UA) in the request with the application/domain name, optionally version number. You should also include a company email address or a link to the company website where we can find contact information. If we cannot contact you in case of problems, you risk being blocked without warning.
Examples of valid User-Agents:
"acmeweathersite.com support@acmeweathersite.com"
"AcmeWeatherApp/0.9 github.com/acmeweatherapp"

I think I can comply with this by setting msg.headers to

{
   "User-Agent":"Node-RED test / me@mymail.com",
   "If-Modified-Since":"foobar"
}
  1. Is this the right syntax to set the headers?
  2. Is there any way to see the outgoing request with all of it's headers?

Should be enough to do this in the UI

To check the headers - you can send the request to your own endpoint URL and use a debug set to show full message.

endpoint

http-in URL=/dummy -------> http-response
                   |-------> debug

Thanks Steve.

Clarifying for my future reference:

Creating an endpoint: that's just an http-in node with URL /dummy
And the http-request to call it has URL http://localhost:1880/dummy

The request times out because I have not coded an html response & matching http-out node, but the debug shows

{
    "user-agent":"\"Node-RED me@here.com\"",
    "if-modified-since":"foobar",
    "host":"localhost:1880",
    "connection":"keep-alive"
}

I assume that the lower case header property names will not be an issue.

:+1: