User icon
@paradock when i click the url in the console it works baradock pls halp ;-;
User icon
Can someone tell me why im getting errors when i do this in the console

return await fetch('https://api.darflen.com/feed/render?page=1', {
method: 'GET',
...{
'Content-Type': 'application/json',
'Access-Control-Allow-Origin': '*',
'Authorization': 'Bearer ' + localStorage.token
}
})
Comments
  • User icon
    don't use feed/render or anything /render as this is for darflen (it renders html), use the /get equivalent, if there's no /get, i gotta add it
  • User icon
    because you need to be logged in to view that endpoint. i.e., when you click the url it works because you are using your authorization cookie, but if you want to use fetch you will need to add a cookie or authorization header.

    edit: i didn't realise you were using an authorization header. in that case, i don't know why

    edit 2: i could get it to work but only with the auth_token cookie, not the authorization header. However, even when I got this to work, i could not get it to run on the browser because it returned a CORS error
  • User icon
    *baradick