I am trying to make a REST Api in Django by outputting Json. I am having problems if i make a POST request using curl in terminal. The error i get is
Simply remove trailing slash from your URLs
urlpatterns = [
path('', views.home, name= 'home'),
path('contact/', views.contact, name= 'contact'),
path('about/', views.about, name= 'about')
]
Change to
urlpatterns = [
path('', views.home, name= 'home'),
path('contact', views.contact, name= 'contact'),
path('about', views.about, name= 'about')
]
OR
Add trailing slash to action in HTML Form
It worked for me