Form is able to post request

This commit is contained in:
Amit Jakubowicz 2018-09-16 20:16:02 +02:00
parent 4298fa3397
commit 9d92b48aab
2 changed files with 7 additions and 3 deletions

View File

@ -36,10 +36,13 @@ const InitialValues: CalendarEventRequest = {
export default class CreateEvent extends React.Component {
componentDidMount(){
axios.get('/api/events').then(events => console.log('boludo', events))
}
submitEvent(event: CalendarEventRequest) {
axios.post('/api/event', event, {
axios.post('/api/events', event, {
headers: {
Accept: 'application/json'
Accept: '*/*'
}
})
}

View File

@ -13,6 +13,7 @@
},
"rules": {
"member-access": false,
"object-literal-sort-keys":false
"object-literal-sort-keys":false,
"no-console": false
}
}