Hi All, I am having an issue with creating new entries into my airtable. I am able to GET the data from my airtable with the axios code:
getTable() {
axios.defaults.headers = {
Authorization: ‘Bearer key$$$$$#@@@@’
}
axios.get(‘api.airtablenolinksallowed/v0/applHDrandomTWT/tasks’)
.then(response => {
console.log(response);
})
},
However, when I try to post to the same table I am getting the error: POST api.airtablenolinksallowed/v0/applxDrxrandomzTWT/tasks 422 (Unprocessable Entity)
Here is my axios for post:
postTable() {
axios.defaults.headers = {
‘Content-Type’: ‘application/json’,
Authorization: ‘Bearer key$$####$$$#’
}
let data = {};
data.Name = ‘TestName’;
data.Notes = ‘ASXXZSXSZX’
console.log(data);
axios.post(‘api.airtablenolinksallowed/v0/applHDrrandomTWT/tasks’, data)
.then(response => {
console.log(response);
})
},
What am I doing wrong with my axios post?