| Server IP : 138.197.162.186 / Your IP : 216.73.216.184 Web Server : nginx/1.24.0 System : Linux ubuntu-s-1vcpu-512mb-10gb-tor1 6.8.0-71-generic #71-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 22 16:52:38 UTC 2025 x86_64 User : www-data ( 33) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/uaclient/http/__pycache__/ |
Upload File : |
�
��Jh� � � � d dl Z d dlZd dlZd dlZd dlmZmZmZ d dlm Z d dl
mZmZm
Z
mZmZ G d� de j �� Zy)� N)�Any�Dict�Optional)� urlencode)�config�http�system�util�versionc �� � e Zd ZdZdZeej defd�� � Z dde
ej ddfd�Z
d� Z dded e
e dej$ fd
�Zdefd�Zdede
ej$ fd
�Zy)�UAServiceClient� N�returnc � � y)z@String in subclasses, the UAConfig attribute containing base urlN� ��selfs �=/usr/lib/python3/dist-packages/uaclient/http/serviceclient.py�cfg_url_base_attrz!UAServiceClient.cfg_url_base_attr s � �
� �cfgc �J � |st j � | _ y || _ y �N)r �UAConfigr )r r s r �__init__zUAServiceClient.__init__ s � �����(�D�H��D�Hr c �P � dj t j � � ddd�S )NzUA-Client/{}�application/json)z
user-agent�accept�content-type)�formatr �get_versionr s r �headerszUAServiceClient.headers s) � �(�/�/��0C�0C�0E�F�(�.�
�
r �log_response_body�timeoutc �T � |j d� }|s| j � }|j d� dk( r6|r4t j |t
j �� j d� }t j t | j | j � |� }| j |� } | r| S |r@t |j � � D �
�ci c] \ }
}|�� |
|��
}}
}|dt! |� z z
}|�|n| j"