@osalonga:
A new version (2.0.1) is available on Github. Similar to the http-request node, it is now possible to select the output return format (for body request and response bodies) in the config screen:
I have also changed the code to make sure that NodeJs works with binary data (i.e. buffer), and you can optionally select in the config screen to convert the binary data to a string or a JSON object. That way no bytes will be messed up, in case you want to keep the binary body ...
A new section (with example flow) has been added to the readme file.
Can you provide a simple example flow and explain what is going wrong. I have never used the api key before, so it would be more efficient if I don't have to digg into the details of it ...
Hello people!
I was able to use this node with urls (like @BartButenaers examples) but when I tried to use with ip directions (like 190.xxx.xxx.xxx) it didn't work.
You know if I need set something particular, or this node doesn't work without dns?
Hi Bart, thanks for your quickly reply! And yes... I am new in this forum and in node-red world
Answering your questions:
Exactly, your examples work perfectly.
If at the http request node I put: "https://api.ipify.org?format=json", and in http logger nodes I put: "ipify" or "https", etc. It works, even if I leave the URL filter empty.
However, if at the http request node I put something like: "192.168.0.109/device", and in http logger nodes I put: "device" or "192", etc. It doesn't work, not even if I leave URL filter empty.
I suppose that http request node works only with strings.
The thing is it would be great if I could logging access to my server, but I can't assign a dns to my IP. So, your node seemed perfect but I couldn't make it work in the way that I need it.
I have no explanation for that at the moment. Would have thought that this should work ...
Problem is that the http-logger node doesn't work anymore in my current setup (nodeJs version 12.18.3). Have been debugging this morning, but is like looking a needle in a haystack... Finally I found something weird in my code:
var mitm_singleton = new Mitm();
Have found at last that it seems to work again when I remove the new...
My time is up now. Will have a look at this tonight ...
I have removed the new in my Github repository, and then it works again for me ...
You can install my version directly from Github like this (from within your Node-RED folder!!):
But I have to admit that the whole MITM stuff is quite obscure...
If this doesn't work in your case, I have not much ideas left what is going wrong ...
Hi Bart! I had on vacations last week... and disconected of all I am just catching up with all my mails.
I will try with your new version and I will tell you how it works!
Hi Bart!
I tell you... I installed your new version, restarted node-red and test it. Unluckly it didn't work. Even it hung the node-red. In the console It logs:
10 Sep 15:48:57 - [red] Uncaught Exception:
10 Sep 15:48:57 - Error: getaddrinfo ENOTFOUND 190.0.NNN.NNN:1883
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:66:26)
For now, these are the news. I will investigate about this exception and I will update you if I found something.