title: Python requests.post() returns None
body: <p>I know that this issue was discussed earlier but I am unable to find a working solution that fits my use case.</p>
  
  <p>We have an internal server (sorry, no external address available) that returns data. Invoking a POST Method on the Endpoint returns a JSON. I tried the post with the <a href="https://www.getpostman.com/postman" rel="nofollow noreferrer">Postman tool</a> to check a valid response is received. When using a Postman I receive the response as expected. An authentication is not necessary.</p>
  
  <p>However, Python Client fails to return data and an empty response is received.</p>
  
  <p>code snippet :</p>
  
  <pre><code>import json
  import requests
  
  URL_PATH = "https://our.internal.server.rest.address"
  HEADERS = {
      'Content-Type': 'application/json'
  }
  
  DATA = '''{
      "method"  : "object.read",
      "params"  : "",
      "id"      : 142
  }'''
  
  S = requests.session()
  R = S.post(URL_PATH, headers=HEADERS, json=DATA)
  
  if R.ok:
      print("Type: ", R.headers["Content-Type"])
      print("Text: ", str(R.text))
      print("JSON: ", R.json())
      print("Content", R.content)
  else:
      R.raise_for_status()
  
  S.close()
  </code></pre>
  
  <p>The output is:</p>
  
  <blockquote>
    <p>Type:  application/json<br>
    Text:  null<br>
    JSON:  None<br>
    Content b'null'<br></p>
  </blockquote>
  
  <p>Any idea what I'm doing wrong with my Python code and why there is no data returned, but is when using a separate tool?</p>
  
  <p>I also tried to use data= in the post():</p>
  
  <pre><code>S.post(URL_PATH, headers=HEADERS, data=json.dumps(DATA))
  </code></pre>
  
  <p>or skip the Session() by directly using requests.post().</p>