```javascript
const axios = require('axios');
//npm install axios if you don have the module installed`
let options = {
url: "https://api.chainup.net/optimism/mainnet/<YOUR_API_KEY>",
method: "post",
headers:
{
"content-type": "application/json",
"CONSISTENT-HASH": "true"
},
body: JSON.stringify({"jsonrpc":"2.0","method":"getblockchaininfo","params":[],"id":1})
};
request(options, (error, response, body) => {
if (error) {
console.error('An error has occurred: ', error);
} else {
console.log('Post successful: response: ', body);
}
});
```