Skip to content

Instantly share code, notes, and snippets.

// don't wait for a response
const https = require('https');
let requestAndForget = async (host, path, message) => {
message = JSON.stringify(message);
var options = {
hostname: host,
method: 'POST',
path: path,
headers: {
'Content-Type': 'application/json',
<WebView
source={{
uri: 'https://web.whatsapp.com/',
}}
userAgent={'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1.1 Safari/605.1.15'}
/>
var options = {
'method': 'POST',
'hostname': "apipipi.now.sh",
'path': "/api/enpoint1",
'headers': {
'Content-Type': 'application/json'
},
'maxRedirects': 20
};
var req = require('https').request(options);