Closed Ki11Z0n3 closed 2 years ago
@Ki11Z0n3 The content of the response
may not be what is expected and you will need to parse it to the required format to display it correctly
const { body } = await fetch('https://jsonplaceholder.typicode.com/posts/1')
ctx.response({
data: { result: {
text: JSON.parse(body)
} },
})
It doesn't work that way either, is there a way to debug this?
It doesn't work that way either, is there a way to debug this?
It works now, the problem was that I had not given it network permissions
Hello, I'm trying to make an example of an api call but it doesn't show me anything, what am I doing wrong? The API is: https://jsonplaceholder.typicode.com/posts/1
app-side/index.js
pages/index.js