Add custom header & minor refactoring

This commit is contained in:
Gennady Grishkovtsov
2018-10-05 22:51:41 +03:00
parent 5d8139d674
commit 52b7dfe958
8 changed files with 148 additions and 104 deletions

View File

@@ -13,6 +13,7 @@
upload-url="some url"
:attempts="3"
:time="2"
:headers="headers"
:start-record="callback"
:stop-record="callback"
:start-upload="callback"
@@ -24,19 +25,15 @@
</template>
<script>
import AudioPlayer from '../src/components/player'
import AudioRecorder from '../src/components/recorder'
export default {
name: 'app',
components: {
AudioPlayer,
AudioRecorder
},
data () {
return {
mp3: '/demo/example.mp3',
showRecorder: true
showRecorder: true,
headers: {
'X-Custom-Header': 'some data'
}
}
},
methods: {

View File

@@ -2,8 +2,12 @@ import Vue from 'vue'
import axios from 'axios'
import app from './app'
import AudioRecorder from '@/index'
Vue.prototype.$http = axios
Vue.use(AudioRecorder)
new Vue({
el: '#app',
render: h => h(app)