title: requests <Response [500]>
body: <p>I am looking to use the requests class to get data from the web and then post changes to the namespace XML and load back up.</p>
  
  <p>I am able to log-in and get data using requests via: </p>
  
  <pre><code>data_req = requests.get(proj_data_url, headers=headers, auth=(_user, _pw))
  </code></pre>
  
  <p>where headers is <code>{'X-ApiKey': A-ApiKey, 'Authorization': Authorization}</code></p>
  
  <p><code>data_req</code> is a <code>&lt;Response [200]&gt;</code></p>
  
  <p>I then use </p>
  
  <pre><code>data_tree = xml.etree.ElementTree.fromstring(data_req.content)
  </code></pre>
  
  <p>to convert into the and successfully make changes to the <code>data_tree</code></p>
  
  <p>I then use </p>
  
  <pre><code>data_set = xml.etree.ElementTree.tostring(data_tree)
  </code></pre>
  
  <p>to convert back to a string.</p>
  
  <p>I then attempt to post the changes back up via:</p>
  
  <pre><code>_response = requests.post(proj_data_url, data=data_set, headers=headers, auth=(_user, _pw))
  </code></pre>
  
  <p>but receive <code>_response = &lt;Response [500]&gt;</code>, which is apparently a server error. </p>
  
  <p>Can anyone help?</p>