<template>
  <div>
     <my-button  @click="Connect">тест api</my-button>
  </div>
</template>

<script>
import MyButton from "../UI/MyButton.vue";
import axios from "axios";
export default {
 name:'test',
  components: {MyButton},
  data() {
     return {}
  },

  methods:{

    async Connect(){

     try {
       // console.log(param);
       const json = JSON.stringify({
         data: JSON.stringify({test:'ok'}),
       });


       const response = await axios.post('http://10.10.0.168:3015',json,{
         headers: {'Content-Type': 'application/json'}
       });

       console.log(response.data);

       return response.data;

     } catch (e) {
       console.log(e)
     } finally {

     }



   },




  },











}



</script>

<style  scoped>

</style>