title: How do I send a PUT request to API without getting 415 error
body: <p>I'm trying to send a PUT request to an API with a Python script but keep getting a 415 error.
  Can someone point out my mistake?
  Here is my code:</p>
  
  <pre><code>for item in data:
      print(type(item["Status"]))
      print(type(item["Text"]))
      r = requests.put("http://127.0.0.1:8000/api/ratings/" + str(item["id"]) , {"Text": item["Text"], "Status": item["Status"]})
      print(r)
  </code></pre>
  
  <p>This is the 415 message:</p>
  
  <pre><code>&lt;class 'numpy.str_'&gt;
  &lt;class 'str'&gt;
  &lt;Response [415]&gt;
  &lt;class 'numpy.str_'&gt;
  &lt;class 'str'&gt;
  &lt;Response [415]&gt;
  &lt;class 'numpy.str_'&gt;
  &lt;class 'str'&gt;
  &lt;Response [415]&gt;
  &lt;class 'numpy.str_'&gt;
  &lt;class 'str'&gt;
  &lt;Response [415]&gt;
  </code></pre>
  
  <p>server error:</p>
  
  <pre><code>May  7 16:31:30 |DEBUG| May  7 16:31:30 |P3mWARN W |ERSPUT  (415)  api/ratings/4.json/hosth"127.0.0.1:8004" =pi"127.0.0.1" =0.0.1" .0.1" .msch0.1" ch0.1" s0.1" .1" s3936mschemes"https"36mschemehemettps"36mscheme=s"36mschemehememeay  7 16:31:30 |DEBUG| PHP    Notified event "kernel.request" to listener "ApiPlatform\Core\EventListener\AddFormatListener::onKernelRequest". path="C:\\xampp\\php\\php-cgi.exe" php="7.4.4"
  </code></pre>