Help

Re: Fetch Response is Empty

3642 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Vinzenz_Brantne
4 - Data Explorer
4 - Data Explorer

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

1 Reply 1
Vinzenz_Brantne
4 - Data Explorer
4 - Data Explorer

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)