title: JSONDecodeError Django
body: <p>I have an API that is sending me a <strong>POST request (JSON)</strong> for testing. I was doing a lot with the JSON, but all of a sudden it stopped working and giving me a <code>JSONDecodeError</code>. I tried all sorts of things, like using <code>request.POST</code> but nothing worked correctly like I said this was working at one point. Any assistance is appreciated.</p>
  
  <p>Test that gives the error:
  In the Windows Command prompt, running:</p>
  
  <pre><code>curl -X POST http://127.0.0.1:8000/webhook/webhook_receiver/ -d '{"foo": "bar"}'
  </code></pre>
  
  <blockquote>
    <p>Error: <code>json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)</code></p>
  </blockquote>
  
  <p>View:</p>
  
  <pre><code>def webhook_receiver(request, *args, **kwargs):
      if request.method == 'POST':
          # Get the incoming JSON Data
          data = request.body.decode('utf-8')
          received_json_data = json.loads(data)
          return HttpResponse(received_json_data)
      else:
          return HttpResponse("not Post")
  </code></pre>