I have this code:

```
import axios from 'axios'

const storeDevices = values => {
    axios.create({
        baseURL: 'http://localhost:8000/something/store',
        method: 'POST',
        headers: {'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')},
        data: values
    });
}

export default storeDevices;

```

The following code is correct because it returns an object with all data from my form

```
const storeDevices = values => {
    console.log(values);
}

export default storeDevices;

```

Interestingly if I try to use `.then` I have an error:

> 
> axios\_\_WEBPACK\_IMPORTED\_MODULE\_0\_\_\_default.a.create(...).then is not a
> function
> 
> 
> 

Code with `.then`

```
axios.create({
    baseURL: 'http://localhost:8000/something/store',
    method: 'POST',
    headers: {'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')},
    data: values
}).then(res => {
    console.log(res);
    console.log(res.data);
});

```