Commit 415cc3ff authored by Sascha Herzinger's avatar Sascha Herzinger
Browse files

Beginning to implement request service

parent b0c66c19
......@@ -10,7 +10,7 @@
"dependencies": {
"vue": "^2.2.4",
"vuex": "^2.2.1",
"vue-resource": "^1.2.1"
"axios": "^0.15.3"
},
"devDependencies": {
"babel-core": "^6.24.0",
......
/**
* Created by sascha on 16/03/2017.
*/
import axios from 'axios'
export default class {
_validateHandler (handler) {
}
_validateServerURL (thisServerURL) {
}
_validateAuth (thisAuth) {
}
constructor (handler, thisBaseURL, thisAuth, fractalisBaseURL) {
this._validateHandler(handler)
this._validateServerURL(thisBaseURL)
this._validateAuth(thisAuth)
this._validateServerURL(fractalisBaseURL)
this.handler = handler
this.thisBaseURL = thisBaseURL
this.thisAuth = thisAuth
this.fractalisBaseURL = fractalisBaseURL
}
loadData (descriptors) {
axios.post('/data', {
handler: this.handler,
server: this.server,
auth: this.auth,
descriptors,
}).then(response => {
console.log(response)
}).catch(error => {
console.log(error)
})
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment