talkpython / 100daysofweb-with-python-course

Demo code and resources for our 100 Days of Web in Python Course
https://training.talkpython.fm/courses/explore_100days_web/100-days-of-web-in-python
630 stars 391 forks source link

Days 009-012 #8

Closed vladmonea closed 5 years ago

vladmonea commented 5 years ago

Hi, Postman PUT doesn't seem to be working. I am changing values for an item and pressing send yet the return is an unchanged json while the console outputs:

127.0.0.1 - - [17/May/2019 21:40:41] "PUT /6 HTTP/1.1" 302 - 127.0.0.1 - - [17/May/2019 21:40:41] "GET /6/ HTTP/1.1" 200 -

I am running the server in Pycharm (community) from the terminal with python app.py

Thanks, Vlad

mikeckennedy commented 5 years ago

Hi Vlad,

I have been hearing that some times you need a trailing backslash on PUT and DELETE there. Try /6/ and see if that works. @bbelderbos thoughts?

bbelderbos commented 5 years ago

Thanks @mikeckennedy, that has happened to me too in the past. I would need to debug a bit more though to confirm this ...

vladmonea commented 5 years ago

Thank you, @mikeckennedy , the trailing backslash did the trick. Might some back end stuff in apistar.