title: Django API Post method returns 403 error
body: <p>I am trying to setup the Django API (a POST API endpoint). I want to have the same URL path pointing to the same function that handle differently due to if it is POST or GET. Thus, I used the method like this </p>
  
  <pre><code>def handle_post(request):
  
      dict = {}
      dict['email'] = "test"
  
      if request.method == "POST":
          return HttpResponse(json.dumps(dict), content_type="application/json")
  </code></pre>
  
  <p>In the url.py, I have the following code </p>
  
  <pre><code>router = routers.DefaultRouter()
  router.register(r'notes', UsernotesViewSet)
  urlpatterns = patterns('',
  url(r'^', include(router.urls)),
  url(r'^admin/', include(admin_site.urls)),
  url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
  url(r'^docs/', include('rest_framework_swagger.urls')),
  url(r'^example/postrequest', handle_post),
  )
  </code></pre>
  
  <p>But I can not get this work when I perform POST onto the URL   <a href="http://127.0.0.1:8000/example/postrequest?requestid=abc&amp;starthour=10" rel="noreferrer">http://127.0.0.1:8000/example/postrequest?requestid=abc&amp;starthour=10</a>. I did not post anything, but just change the method to POST from GET on httpclient to try this API. Is it ok if I did not post any content to URL ? </p>
  
  <p>I am getting the 403 error, as below :</p>
  
  <blockquote>
    <p>Forbidden (403)<br>
    CSRF verification failed. Request aborted.<br>
    You are seeing this message because this site requires a CSRF cookie when submitting forms. This cookie is required for security reasons, to ensure that your browser is not being hijacked by third parties.
    If you have configured your browser to disable cookies, please re-enable them, at least for this site, or for 'same-origin' requests.</p>
  </blockquote>
  
  <p>Appreciated any help. </p>