Re: I want to know the FQDN of the sender when I send a POST from Cloud Functions.

50 views
Skip to first unread message
Message has been deleted

Frank van Puffelen

unread,
Apr 26, 2023, 11:52:50 PM4/26/23
to Firebase Google Group
Also posted on https://stackoverflow.com/questions/76106792/i-want-to-know-the-fqdn-of-the-sender-when-i-send-a-post-from-cloud-functions

On Wednesday, April 26, 2023 at 8:37:14 PM UTC-7 SOUND VISION wrote:
I use Node.js of Cloud Function.
This is part of my program.

--------------------------------
const postDevice = (user, device) => {
const options = {
host: user.host, //URL
port: device.port, //PORT
method: 'POST',
ContentType: 'text/plain',
//ヘッダーに指示内容をセット
headers: {
email: 'te...@test.jp',
device: 'TV',
action: 'ON',
},
};
const req = http.request(options, (res) => {
res.setEncoding('utf8');
res.on('data', (chunk) => {
console.log('BODY:', chunk);
});
res.on('end', () => {});
});
req.end();
};
--------------------------------

I want to know the FQDN of the sender when I send a POST from Cloud Functions.
Reply all
Reply to author
Forward
0 new messages