<template>
	<b-card-code
		no-body
		title="Axios Post Table">
		<b-table
			responsive="sm"
			:items="items" />
	</b-card-code>
</template>

<script>
import BCardCode from '@core/components/b-card-code/BCardCode.vue'
import { BTable } from 'bootstrap-vue'
import useJwt from '@/auth/jwt/useJwt'

export default {
	components: {
		BCardCode,
		BTable,
	},
	data() {
		return {
			items: [],
		}
	},
	mounted() {
		useJwt.postData('/api/foo',null).then(response => {
			this.items = response.data;
		}).catch(error =>{
			console.log(error)
			this.items = [{"錯誤訊息":error}];
		}); 
	},
}
</script>
