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"
}
- Is this the right syntax to set the headers?
- Is there any way to see the outgoing request with all of it's headers?