gorgeous-airport-54386
12/27/2021, 9:17 AMadamant-exabyte-92636
12/27/2021, 9:28 AMadamant-exabyte-92636
12/27/2021, 9:44 AMadamant-exabyte-92636
12/27/2021, 9:44 AMadamant-exabyte-92636
12/27/2021, 9:46 AMgorgeous-airport-54386
12/27/2021, 9:47 AMgorgeous-airport-54386
12/27/2021, 9:49 AMadamant-exabyte-92636
12/27/2021, 9:53 AMgorgeous-airport-54386
12/27/2021, 9:53 AMgorgeous-airport-54386
12/27/2021, 9:54 AMadamant-exabyte-92636
12/27/2021, 9:55 AMadamant-exabyte-92636
12/27/2021, 10:00 AMgorgeous-airport-54386
12/27/2021, 10:01 AMgorgeous-airport-54386
12/27/2021, 10:02 AMgorgeous-airport-54386
12/27/2021, 10:03 AMgorgeous-airport-54386
12/27/2021, 10:04 AMadamant-exabyte-92636
12/27/2021, 10:07 AMmysterious-toddler-20573
12/27/2021, 10:16 AMmysterious-toddler-20573
12/27/2021, 10:20 AMmysterious-toddler-20573
12/27/2021, 10:21 AMcalm-ice-23682
12/27/2021, 11:57 AMcreamy-apple-46772
12/27/2021, 1:15 PMhtmx.org@1.6.1:1 SyntaxError: Unexpected token < in JSON at position 0
I am returning HTML from FastAPI and this is the code:
response = '<div class="mr-2 w-3 rounded-full h-3 bg-red-500"></div>'
return HTMLResponse(content=response, status_code=200)
In my HTML template, this is what I have set up:
<div hx-get="http://0.0.0.0:8000/prep/node-status/?address={{ .Params.address }}" hx-trigger="load"></div>
It seems like HTMX thinks I am returning JSON, but my API is set up to HTML. Does anyone have any tips on how to get rid of the error?blue-gold-89534
12/27/2021, 2:02 PMblue-gold-89534
12/27/2021, 2:04 PMcolossal-glass-79762
12/27/2021, 2:21 PMgentle-dream-18175
12/27/2021, 3:20 PMgentle-dream-18175
12/27/2021, 3:22 PM