const got = require('got');
const {request} = require('http2-wrapper');
const h2got = got.extend({request});
const currentRequestPromise = h2got.post("http://enhcvrwpf7kw6.x.pipedream.net", {
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ query: "Hello" }),
protocol: "http:"
})
currentRequestPromise
.then(({ body, json }) => {
console.log({"body": body})
console.log({"json": json})
})
.catch(error => {
console.log({"error": error})
})