#Beginner useFetch issues

3 messages · Page 1 of 1 (latest)

harsh crown
#

Something else interesting I just noticed is useFetch returns a reference object for a quick api I just set up to test this, but claims it's null - and on my servers end I don't even se the request come through

<template>
  <div class="container">
    hello from index

  </div>
</template>

<script setup>

  const { data: json_data } = await useFetch('https://jsonplaceholder.typicode.com/todos/1')
  console.log(json_data.value);

  const { data: my_data } = await useFetch('http://localhost:7777')
  console.log(my_data);


</script>
@app.get("/")
async def index(request):
    print(request)
    return json({"hello": "world"})
twin vault
#

Facing the same issue