title: Passing JSON data from response to request in Django
body: <p>I have a Django (1.8.3) view that: </p>
  
  <ul>
  <li><p>Makes a GET request to Server A (jetty), which returns JSON data in the body of the response. Then, </p></li>
  <li><p>Makes a POST to Server B (node.js), passing the JSON data recieved from Server A in the body of the request. </p></li>
  </ul>
  
  <p>The JSON data is structured like: </p>
  
  <pre><code>{
      name: "foo",
      details: { 
          "date": "today",
          "isCool": "no",
      }, 
      stuff: [
          { 
              "id": "1234",
              "rating": "5",
          }, { 
              "id": "5678",
              "rating": "1",
          },       
      ]
  }
  </code></pre>
  
  <p>But I can't figure out how to get the JSON from Server A's response into the request to Server B in my Django view. If I do this: </p>
  
  <pre><code>jetty_response = requests.request(method='GET', url=jetty_url)
  node_response = requests.request(method="POST", url=node_url, 
                     data=jetty_response.json())
  </code></pre>
  
  <p>I get the JSON object in Server B, but it looks like this: </p>
  
  <pre><code>  {
      name: "foo",
      details: [ "date", "isCool"],
      stuff: [ "id", "rating",  "id", "rating"]
  </code></pre>
  
  <p>i.e. the <code>name</code> property is correct, but the details dict is instead received as the keyset of the original dict, and the stuff list is received as a flat array of the keysets in all objects in the original dict.</p>
  
  <p>If I instead do this in django: </p>
  
  <pre><code>node_response = requests.request(method="POST", url=node_url, 
                    data=json.dumps(jetty_response.json()))
  </code></pre>
  
  <p>I get an empty object in node, and same goes if I do simply: </p>
  
  <pre><code>data=jetty_response.content
  </code></pre>
  
  <p><strong>How do I make this request??</strong></p>