Http transport error using node-red

In Postman the following payload returns a 200 OK message
I set up the header in Postman with Content-Type application/json


{
    "protected": {
        "ver": "v1",
        "alg": "HS256",
        "iat": 1564128599
    },
    "signature": "b0ee0572a1984b93b6bc56e6576e2cbbd6bccd65d0c356e26b31bbc9a48210c6",
    "payload": {
        "device_name": "ac:87:a3:0a:2d:1b",
        "device_type": "BME680",
        "interval_ms": 20000,
        "sensors": [
            { "name": "temperature", "units": "Cel" },
            { "name": "relative humidity", "units": "%RH" },
            { "name": "resistance", "units": "N/A" },
            { "name": "pressure", "units": "N/A" }
        ],
        "values":  [[ 9.81, 0.03, 1.21,67.1 ],
                    [ -9.83, 0.4, 1.27,34.1 ],
                    [ 0.12, 0.03, 1.23 ,25.31],
                 [ 0.14, 0.11, 1.25,36.4 ]]
           
        
    }
}

But when I inject the same message using a Node-Red flow I get non-http transport requested error message. But I have Httpostbin endpoint also defined in Node-Red and it returns the following

Content-Length: "487"
Content-Type: "application/json"
Host: "httpbin.org"
X-Amzn-Trace-Id: "Root=1-63c92930-021f05b3333fac65202f45b3"
X-Api-Key: "<my api key>"
X-File-Name: "sensor-stack0"

It looks OK to me. Any ideas what’s going wrong?

Hello @sinbit,

Can I make sure you used a POST request pointing this url https://ingestion.edgeimpulse.com/api/training/data

You can find more info on how to use the ingestion API here: Ingestion service - Edge Impulse API

Also be advised of the different Endpoints:

1 Like

I worked out what the problem was. In the node-red flow, I had a leading space on the URL of the http request node. This is something that is easy to overlook as there is no format checking on node deploy and easy to overlook with my poor eyesight

1 Like