Share feedback, ideas and get community help

m
marsh
Offline, last seen 4 months ago
Joined September 13, 2024
My problem is simple, but couldn't find anywhere talking about this, the http request integration doesn't seem to let you save the entire response (no i can't save each piece of the response in a var because the response has lots of possibilities, nothing i can easily map) in a variable, so i tried using scripts but nothing i try works.

the error i'm getting: SyntaxError: Unexpected token 'o', "[object Response]" is not valid JSON

here is the last iteration my my script following what i found on the documentation and basic js knowledge:
const response = await fetch(`${{databaseRequest}}', {
method: 'GET',
headers: {
'apikey': 'the api key value'
}
})
const data = JSON.parse(response)

setVariable({{questionResponse}}, data)

sorry if this is some rookie mistake, i'm kinda knew to everything here, before this i only did some smal backend and math problem solving with python. I really don't understand what the syntax error means, i kinda see where it's going but can't completely understand it.

the databaseRequest is a valid url, i've tested it many times
1 comment
B