| Server IP : 138.197.176.125 / Your IP : 216.73.217.54 Web Server : Apache/2.4.41 (Ubuntu) System : Linux SuiteCRM-8 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.3.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/uaclient/http/__pycache__/ |
Upload File : |
U
Uٵg� � @ st d dl Z d dlZd dlZd dlZd dlmZmZmZ d dlm Z d dl
mZmZm
Z
mZmZ G dd� de jd�ZdS )� N)�Any�Dict�Optional)� urlencode)�config�http�system�util�versionc @ s� e Zd ZdZdZeejed�dd���Z de
ej dd�dd�Z
d d
� Zdee
e ejd�d
d�Zed�dd�Zee
ej d�dd�ZdS )�UAServiceClient� N)�returnc C s dS )z@String in subclasses, the UAConfig attribute containing base urlN� ��selfr r �=/usr/lib/python3/dist-packages/uaclient/http/serviceclient.py�cfg_url_base_attr s z!UAServiceClient.cfg_url_base_attr)�cfgr
c C s |st �� | _n|| _d S �N)r �UAConfigr )r r r r r �__init__ s zUAServiceClient.__init__c C s d� t�� �ddd�S )NzUA-Client/{}�application/json)z
user-agentZaccept�content-type)�formatr
Zget_versionr r r r �headers s �zUAServiceClient.headersT)�log_response_body�timeoutr
c C s� |� d�}|s| �� }|�d�dkr>|r>tj|tjd��d�}t� t
| j| j�|�}| �
|�} | rf| S |r�dd� t|�� �D �}
|dt|
� 7 }|d k r�|n| j}tj||||||d �S )
N�/r r )�clszutf-8c S s i | ]\}}|d k r||�qS r r )�.0�k�vr r r �
<dictcomp>>