I am using django-rest-framework. I have a few APIs which I use to GET data. When I am testing a new API to post information, I am getting a 403 forbidden while making the request as vanilla xhr object, as well as using jQuery. The same API is working properly from Postman and django-rest-framework API interface as well. What can be the reason for this?
7
-
add "/" on the end of post url– RobertJun 23 at 14:51
-
Its already there, still getting the error: $.post( "localhost:8000/foo/api/comment/25632", { name: "John", time: "2pm" } );– Tapabrata MukherjeeJun 23 at 15:05
-
localhost:8000/foo/api/comment/25632/– RobertJun 23 at 15:11
-
Check if it is blocked by CORS policy or not in the network tab.– Mahmudul AlamJun 23 at 15:19
-
Oh my bad, I added the trailing slash, but still the same. No its not blocked by CORS.– Tapabrata MukherjeeJun 23 at 15:34
|
Show 2 more comments