i'm trying to do a simple POST request to my endpoint, but i'm getting a 405 "Method not Allowed", here's my code:
urlpatterns = [
url(r'^api/exemplo/post/$', ExempleView.as_view(), name='post'),
]
Post method:
class ExempleView(APIView):
def post(self, request, *args, **kwargs):
print(request.data)
Server logs:
Method Not Allowed (POST): /api/exemplos/post/
[29/Apr/2017 14:30:20] "POST /api/exemplos/post/ HTTP/1.1" 405 0
I'm using Postman to do the post request and rest_framework to create my API, any suggestion?