AlkantarClanX12

Your IP : 18.116.86.132


Current Path : /opt/alt/python37/lib/python3.7/site-packages/raven/transport/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib/python3.7/site-packages/raven/transport/__pycache__/http.cpython-37.pyc

B

��Y�@shdZddlmZddlmZmZddlmZddlm	Z	m
Z
ddlmZddl
mZGdd	�d	e�Zd
S)z�
raven.transport.http
~~~~~~~~~~~~~~~~~~~~

:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
�)�absolute_import)�string_types�urllib2)�defaults)�APIError�RateLimited)�	Transport)�urlopenc@s0eZdZddgZejdejfdd�Zdd�ZdS)	�
HTTPTransportz	sync+httpz
sync+httpsTcCs>t|t�rt|�}t|t�r(tt|��}||_||_||_dS)N)�
isinstancer�int�bool�timeout�
verify_ssl�ca_certs)�selfrrr�r�E/opt/alt/python37/lib/python3.7/site-packages/raven/transport/http.py�__init__s

zHTTPTransport.__init__c
Cs�tj||d�}yt|||j|j|jd�}Wn�tjk
r�}zp|j�d�}|�	�}|dkr�yt
|j�d��}	Wnttfk
r�d}	YnXt
||	��n|r�t||��n�Wdd}~XYnX|S)zH
        Sends a request to a remote webserver using HTTP POST.
        )�headers)�url�datarrrzx-sentry-errori�zretry-afterrN)rZRequestr	rrr�	HTTPErrorr�getZgetcoder�
ValueError�	TypeErrorrr)
rrrr�req�response�exc�msg�codeZretry_afterrrr�sends*
zHTTPTransport.sendN)	�__name__�
__module__�__qualname__�schemerZTIMEOUTZ	CA_BUNDLErr!rrrrr
s
r
N)�__doc__�
__future__rZraven.utils.compatrrZ
raven.confrZraven.exceptionsrrZraven.transport.baserZraven.utils.httpr	r
rrrr�<module>s