Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here
Nov 18, 2021 05:54 AM
Hey,
I want to sync my base with another endpoint.
Thus I created an automation with a trigger on update > than fetch result with post request to other endpoint.
The problem is, that I do not get any response.
const res = await fetch(url, { method: "POST", body: JSON.stringify(body), headers: headers })
console.log(res.json())
I checked the fetch function with different endpoints, in Postman I do get the response back, but not with the fetch function from airtable.
Am I doing something wrong?
br
Vinzenz
Nov 18, 2021 06:43 AM
I found my mistake.
the correct code is:
const res = await fetch(url, { method: "POST", body: JSON.stringify(body), headers: headers })
const data = await res.json()
console.log(data)