Ind.ie is now Small Technology Foundation.
Commit 16e33e42 authored by wim-vantomme's avatar wim-vantomme

Fixed axios header to post back to nuxt enabled feathersjs server.

parent f52dd622
# magic-website-factory
Endpoint:
## Notes
**Endpoint:**
http://localhost:4040/domain
Data:
```
{
"name": "frauke",
"domain": "frauke.gent",
"callbackUrl": "http://localhost:3030/ready",
"delay": 5000
}
```
## About
This project uses [Feathers](http://feathersjs.com). An open source web framework for building modern real-time applications.
......
const axios = require('axios')
const axiosConfig = {
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
}
}
class Service {
constructor (options) {
this.options = options || {}
......@@ -17,10 +24,11 @@ class Service {
async create (data, params) {
setTimeout(() => {
axios.post(data.callbackUrl, { domain: data.domain }).then(() => {
axios.post(data.callbackUrl, { domain: data.domain }, axiosConfig).then(() => {
console.log('done')
}).catch((err) => {
console.log(err)
console.log(data)
})
}, data.delay)
......
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