1

I am using DJango based API server calls. We had a URL in main project folder as

urlpatterns = [
    url(r'^api/', include('api.urls')),
]

and then in project folder as

urlpatterns = [
    url(r'^widgets', views.index, name='stock-widgets'),
]

when we hit the URL as https://example.com/api/widgets sometimes it returns 200 OK and sometimes as 404 Not Found error.

I checked http error logs , in error logs it was returning as 404 not found error for specific url as '/api/widgets/' 404 Not found

As manytimes it is returning 200 but few of the times it returns 404. Kindly help what should be the error.

0 Answers0