title: Load a JSON File from a URL request
body: <p>Currently, I am using the code below to load a JSON file. However, I want to load the JSON data without saving a file to my laptop. I tried directly to load however it is giving me an error.</p>
  <p>First Code:</p>
  <pre><code>url = &quot;example.url&quot;
  response = requests.request(&quot;GET&quot;, url, headers=headers)
  with open('save.json', 'wb') as outf:
      outf.write(response.content)
  file = open(&quot;save.json&quot;)
  data = json.load(file)
  </code></pre>
  <p>Code Tried:</p>
  <pre><code>url = &quot;example.url&quot;
  response = requests.request(&quot;GET&quot;, url, headers=headers)
  data = json.load(response.content)
  </code></pre>
  <p>Error:</p>
  <pre><code>AttributeError: 'bytes' object has no attribute 'read'
  </code></pre>