Skip to content

Instantly share code, notes, and snippets.

@christianbertschy
Last active November 4, 2016 15:31
Show Gist options
  • Save christianbertschy/b85e8f1a71b5d18d0c650b45b1df0415 to your computer and use it in GitHub Desktop.
Save christianbertschy/b85e8f1a71b5d18d0c650b45b1df0415 to your computer and use it in GitHub Desktop.
In [16]: requests.post(url, data="https://control.aldryn.com/api/v1/apps/serve/aldryn-addons/1.0.2/24f5d1c8-66fe-43b2-a540-17d61045a72b/aldryn-addons-1.0.2.tar.gz#egg=aldryn-addons==1.0.2\n")
Out[16]: <Response [200]>
In [17]: requests.post(url, data="https://control.aldryn.com/api/v1/apps/serve/aldryn-addons/1.0.2/24f5d1c8-66fe-43b2-a540-17d61045a72b/aldryn-addons-1.0.2.tar.gz#egg=aldryn-addons==1.0.2\n")
Out[17]: <Response [200]>
In [18]: requests.post(url, data="https://control.aldryn.com/api/v1/apps/serve/aldryn-addons/1.0.2/24f5d1c8-66fe-43b2-a540-17d61045a72b/aldryn-addons-1.0.2.tar.gz#egg=aldryn-addons==1.0.2\nhttps://control.aldryn
...: .com/api/v1/apps/serve/aldryn-django/1.8.16.0/504b6173-d90a-4acf-a0fc-971e420f606b/aldryn-django-1.8.16.0.tar.gz#egg=aldryn-django==1.8.16.0")
---------------------------------------------------------------------------
ConnectionError Traceback (most recent call last)
<ipython-input-18-b30010b0f881> in <module>()
----> 1 requests.post(url, data="https://control.aldryn.com/api/v1/apps/serve/aldryn-addons/1.0.2/24f5d1c8-66fe-43b2-a540-17d61045a72b/aldryn-addons-1.0.2.tar.gz#egg=aldryn-addons==1.0.2\nhttps://control.aldryn.com/api/v1/apps/serve/aldryn-django/1.8.16.0/504b6173-d90a-4acf-a0fc-971e420f606b/aldryn-django-1.8.16.0.tar.gz#egg=aldryn-django==1.8.16.0")
/root/.local/venvs/pip-reqs/lib/python2.7/site-packages/requests/api.pyc in post(url, data, json, **kwargs)
108 """
109
--> 110 return request('post', url, data=data, json=json, **kwargs)
111
112
/root/.local/venvs/pip-reqs/lib/python2.7/site-packages/requests/api.pyc in request(method, url, **kwargs)
54 # cases, and look like a memory leak in others.
55 with sessions.Session() as session:
---> 56 return session.request(method=method, url=url, **kwargs)
57
58
/root/.local/venvs/pip-reqs/lib/python2.7/site-packages/requests/sessions.pyc in request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json)
473 }
474 send_kwargs.update(settings)
--> 475 resp = self.send(prep, **send_kwargs)
476
477 return resp
/root/.local/venvs/pip-reqs/lib/python2.7/site-packages/requests/sessions.pyc in send(self, request, **kwargs)
594
595 # Send the request
--> 596 r = adapter.send(request, **kwargs)
597
598 # Total elapsed time of the request (approximately)
/root/.local/venvs/pip-reqs/lib/python2.7/site-packages/requests/adapters.pyc in send(self, request, stream, timeout, verify, cert, proxies)
471
472 except (ProtocolError, socket.error) as err:
--> 473 raise ConnectionError(err, request=request)
474
475 except MaxRetryError as e:
ConnectionError: ('Connection aborted.', error(104, 'Connection reset by peer'))
In [19]: requests.post(url, data="https://control.aldryn.com/api/v1/apps/serve/aldryn-addons/1.0.2/24f5d1c8-66fe-43b2-a540-17d61045a72b/aldryn-addons-1.0.2.tar.gz#egg=aldryn-addons==1.0.2\nhttps://control.aldryn
...: .com/api/v1/apps/serve/aldryn-django/1.8.16.0/504b6173-d90a-4acf-a0fc-971e420f606b/aldryn-django-1.8.16.0.tar.gz#egg=aldryn-django==1.8.16.0")
---------------------------------------------------------------------------
ConnectionError Traceback (most recent call last)
<ipython-input-19-b30010b0f881> in <module>()
----> 1 requests.post(url, data="https://control.aldryn.com/api/v1/apps/serve/aldryn-addons/1.0.2/24f5d1c8-66fe-43b2-a540-17d61045a72b/aldryn-addons-1.0.2.tar.gz#egg=aldryn-addons==1.0.2\nhttps://control.aldryn.com/api/v1/apps/serve/aldryn-django/1.8.16.0/504b6173-d90a-4acf-a0fc-971e420f606b/aldryn-django-1.8.16.0.tar.gz#egg=aldryn-django==1.8.16.0")
/root/.local/venvs/pip-reqs/lib/python2.7/site-packages/requests/api.pyc in post(url, data, json, **kwargs)
108 """
109
--> 110 return request('post', url, data=data, json=json, **kwargs)
111
112
/root/.local/venvs/pip-reqs/lib/python2.7/site-packages/requests/api.pyc in request(method, url, **kwargs)
54 # cases, and look like a memory leak in others.
55 with sessions.Session() as session:
---> 56 return session.request(method=method, url=url, **kwargs)
57
58
/root/.local/venvs/pip-reqs/lib/python2.7/site-packages/requests/sessions.pyc in request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json)
473 }
474 send_kwargs.update(settings)
--> 475 resp = self.send(prep, **send_kwargs)
476
477 return resp
/root/.local/venvs/pip-reqs/lib/python2.7/site-packages/requests/sessions.pyc in send(self, request, **kwargs)
594
595 # Send the request
--> 596 r = adapter.send(request, **kwargs)
597
598 # Total elapsed time of the request (approximately)
/root/.local/venvs/pip-reqs/lib/python2.7/site-packages/requests/adapters.pyc in send(self, request, stream, timeout, verify, cert, proxies)
471
472 except (ProtocolError, socket.error) as err:
--> 473 raise ConnectionError(err, request=request)
474
475 except MaxRetryError as e:
ConnectionError: ('Connection aborted.', error(104, 'Connection reset by peer'))
In [20]:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment