import axios from "axios";
import { object } from "yup";

async function postData(url: string, body: object = {}) {

    let response;

    try {
        response = await axios.post(url, body);
        console.log(response.data); // handle successful response
    } catch (error) {
        console.error(error); // handle error
    }

    return response
}

export default postData