const fetch = require("node-fetch")

class OpenGraphURL {
    constructor() {
        
    }

    async post (obj )  {
     return fetch('http://localhost/urlshortener/api/index.php', {
        method: 'post',
        body:    JSON.stringify(obj),
        headers: { 'Content-Type': 'application/json' },
    })
    
    
    
    }
}




exports.post = async (obj) => {
    const open = new OpenGraphURL();
 
   return open.post(obj);

}


