Answer the question
In order to leave comments, you need to log in
How to work with api?
Hello, I am writing a project on pure node.
There is a task to write a payment handler. On this occasion I would like to ask a few questions.
1. You need to check the ip from which the request came. Those. there is an array with trusted ips, but how can I find out the ip from which the handler is being called?
Will it fit request.connection.remoteAddress
?
2. Post parameters also come. If in php I would receive them via $_POST, then how can I do it in pure node js? I think this design will not be relevant?
let body = '';
req.on('data', data=>{
body += data.toString();
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question