r/FastAPI • u/barnez29 • Dec 30 '20
Question Fast API - AJAX Put Method not working
Good day - before any critique just wanna say I am new to FastAPI. I need help with the following...I am just trying to do a simple CRUD using bootstrap front-end.
The backend(swagger docs) is working fine....however I am not able to seemingly link front-end component. I am using Postgresql DB.
What I have done:
1- being able to Create Post method and it updates the DB successfully
2- able to get single record from DB - and display on the front-end
What is not working:
3- Update/PUT method
To do still:
4- Delete method
I am using JQuery/Ajax - which might not be the best implementation(understood and agreed) but my intent is to understand how FastAPI works both front-end and backend...
Having said above - I would appreciate if you able to have a look at the issue i logged on SO and provide some feedback please herewith the link https://stackoverflow.com/questions/65419931/fastapi-using-jquery-ajax-put-method-not-working
once working next step for me would be to find a more pydantic manner in which to make same work.
Thanks in advance
1
u/sharpenerbottle Dec 30 '20
In the code segments you posted, your ajax calls for the
editandupdatebutton doesn't have any data provided?