title: How to get full server response message in Requests (or urllib3.response)?
body: <p>I encountered problems with Google Sheet API these few days, all response message I can get from Requests (by way of requests_oauthlib extension) is the headers &amp; <code>400 Bad Request</code>. Requests version is <code>2.19.1</code>. This happened with several endpoints (<code>v4</code>), like <code>spreadsheets.values.append</code>, <code>spreadsheets.values.batchUpdate</code>, <code>spreadsheets.values.update</code>, etc.</p>
  
  <p>I've wasted hours making sure I have formed the correct data structure to no avail, and only then I realized I didn't get the whole response message from the API server.</p>
  
  <p>It seems since <code>requests.Response</code> object that gets returned from <code>r = request.Request('https://httpbin.org')</code> is from a <a href="https://github.com/requests/requests/blob/master/requests/adapters.py#L481" rel="nofollow noreferrer"><code>requests.HTTPAdapter</code></a> object, which in turn is sort of a wrapper for <code>urllib3.response.HTTPResponse</code>. So I tried to use <a href="https://github.com/requests/requests/blob/master/requests/adapters.py#L272" rel="nofollow noreferrer"><code>r.reason</code></a>, <code>r.raw._original_response</code>, <code>r.raw._body</code>, <code>r.raw.msg</code> which didn't give me anything but object reference &amp; <code>None</code> (or just empty string).</p>
  
  <p>Long story short, I gave up for a while &amp; when got back to it I realized I should've tried using Google's API explorer that i've been ignoring, and it turned out there <em>is</em> an error message in the response, and the 400 error wasn't due to any bad payload/data structure form.</p>
  
  <pre><code>{   "error": {
      "code": 400,
      "message": "Invalid data[0]: Requested writing within range [mysheet!A3:AH3], but tried writing to row [4]",
      "status": "INVALID_ARGUMENT"   } 
  }
  </code></pre>
  
  <p>My question is: </p>
  
  <p>Was I wrong in how I debug connection response from requests &amp; actually there's a method to get the full raw message from the server in requests like a full debug mode in curl? Or is this message is actually only sent if the API request comes from Google API explorer?</p>