title: Connection aborted.', RemoteDisconnected('Remote end closed connection without response') while using python
body: <p>Hello I am attempting to reach <code>https://api.louisvuitton.com/api/eng-us/catalog/availability/M80016 </code> through a session while using request in python. Currently I am unable to reach it and get an error of <em><strong>Remote end closed connection without response</strong></em>.
  I have been trying to debug but havent been successful. Bellow is my code and the output.</p>
  <p>Code:</p>
  <pre><code>import requests
  from requests.auth import HTTPBasicAuth
  import json
  
  
  headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)'}
  
  s = requests.Session()
  r = s.get(&quot;https://us.louisvuitton.com/eng-us/products/pocket-organizer-damier-graphite-nvprod2630093v#N60432&quot;,headers=headers)
  
  if r:
      print(&quot;Requested Successfully&quot;)
  else:
      print(&quot;Request Failed ==&gt; &quot; + str(r))
      exit()
  
  url2 = &quot;https://api.qubit.com/graphql&quot;
  
  payload = json.dumps({
    &quot;query&quot;: &quot;query ($trackingId: String!, $contextId: String!) {\n property(trackingId: $trackingId) {\n   visitor(contextId: $contextId) {\n     ipAddress\n     ipLocation: location {\n       city\n       cityCode\n       country\n       countryCode\n       latitude\n       longitude\n       area\n       areaCode\n       region\n       regionCode\n     }\n     segment: segments {\n       state\n     }\n     history {\n       conversionCycleNumber: conversionCycle\n       conversionNumber: conversions\n       entranceNumber: entrances\n       firstConversionTs: firstConversion\n       firstViewTs: firstView\n       lastConversionTs: lastConversion\n       lastViewTs: lastView\n       lifetimeValue\n       sessionNumber: sessions\n       viewNumber: views\n     }\n   }\n }\n}&quot;,
    &quot;variables&quot;: {
     &quot;trackingId&quot;: &quot;louisvuitton_prod&quot;,
     &quot;contextId&quot;: &quot;o6vfrf9jm4g-0k999shdp-fiadwa4&quot;
    }})
  
  headers2 = {
    'Content-Type': 'application/json'
   }
  
  x = s.post(url2,headers=headers2, data=payload)
  
  if x:
      print(&quot;Post Successfully&quot;)
  else:
      print(&quot;Post Failed ==&gt; &quot; + str(x))
      exit()
  
   
  headers3 = {
      'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)',
      'Accept': &quot;*/*&quot;,
      'Cache-Control': &quot;no-cache&quot;,
      'Host': &quot;api.louisvuitton.com&quot;,
      'Accept-Encoding': &quot;gzip, deflate&quot;,
      'Connection': &quot;keep-alive&quot;,
      'cache-control': &quot;no-cache&quot;,
      'Content-Type': 'application/json'
      }
  
  cookies = s.cookies
  
  t = s.get(&quot;https://api.louisvuitton.com/api/eng-us/catalog/availability/M80016&quot;,headers=headers3,cookies=cookies)
  
  if t:
      print(&quot;Get Successfully&quot;)
  else:
      print(&quot;Get Failed ==&gt; &quot; + str(t))
      exit()
  
  </code></pre>
  <p>Output</p>
  <pre><code>Requested Successfully
  Post Successfully
  Traceback (most recent call last):
    File &quot;/usr/local/lib/python3.8/site-packages/urllib3-1.25.10-py3.8.egg/urllib3/connectionpool.py&quot;, line 670, in urlopen
      httplib_response = self._make_request(
    File &quot;/usr/local/lib/python3.8/site-packages/urllib3-1.25.10-py3.8.egg/urllib3/connectionpool.py&quot;, line 426, in _make_request
      six.raise_from(e, None)
    File &quot;&lt;string&gt;&quot;, line 3, in raise_from
    File &quot;/usr/local/lib/python3.8/site-packages/urllib3-1.25.10-py3.8.egg/urllib3/connectionpool.py&quot;, line 421, in _make_request
      httplib_response = conn.getresponse()
    File &quot;/usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py&quot;, line 1347, in getresponse
      response.begin()
    File &quot;/usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py&quot;, line 307, in begin
      version, status, reason = self._read_status()
    File &quot;/usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py&quot;, line 276, in _read_status
      raise RemoteDisconnected(&quot;Remote end closed connection without&quot;
  http.client.RemoteDisconnected: Remote end closed connection without response
  </code></pre>
  <p>Anyone have a clue or idea how to resolve this issues? Would appreciated any help.</p>