HTTP request node - query string

The http request node was greatly improved in Node-REd version 0.20 with the addition of Bearer and Digest authentication modes. Additionally, a new option was added to allow building a query string from msg.payload. This is explained in the release notes as quoted below:

  • The HTTP Request node can optionally automatically encode msg.payload as query string parameters for a GET request.

What is missing perhaps is a quick note in the help text explaining that msg.payload in such case is expected to be an object, like for instance:

{
    "format": "rss",
    "query": "cars"
}

This example object will generate the query string: format=rss&query=cars

Below how I had to configure a change node to work with this feature from HTPP request node:

r-02

3 Likes

Pull Requests to Docs are always welcome.

Thanks Dave, I will submit one.

Hi Dave, I never did a PR for changing the help text for a core node. Only now I realized (aha moment) that there is no help text in the .html file of the core node (it is not like we do in a contrib-node).

So, after a while I guess I found the right place to make the modification

node-red/packages/node_modules/@node-red/nodes/locales/en-US/io/21-httprequest.html

but another question popped into my head:

If someone changes the help text for English... who will change the help text for the other languages supported by Node-RED ?

We are reliant on the community to help maintain the translations.