appmesh 1.5.5__py3-none-any.whl → 1.5.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- appmesh/http_client.py +7 -1
- appmesh/tcp_client.py +1 -1
- {appmesh-1.5.5.dist-info → appmesh-1.5.6.dist-info}/METADATA +2 -2
- {appmesh-1.5.5.dist-info → appmesh-1.5.6.dist-info}/RECORD +6 -6
- {appmesh-1.5.5.dist-info → appmesh-1.5.6.dist-info}/WHEEL +0 -0
- {appmesh-1.5.5.dist-info → appmesh-1.5.6.dist-info}/top_level.txt +0 -0
appmesh/http_client.py
CHANGED
@@ -1418,6 +1418,7 @@ class AppMeshClient(metaclass=abc.ABCMeta):
|
|
1418
1418
|
"""
|
1419
1419
|
rest_url = parse.urljoin(self.auth_server_url, path)
|
1420
1420
|
|
1421
|
+
# Prepare headers
|
1421
1422
|
header = {} if header is None else header
|
1422
1423
|
if self.jwt_token:
|
1423
1424
|
token = self.jwt_token["access_token"] if isinstance(self.jwt_token, dict) and "access_token" in self.jwt_token else self.jwt_token
|
@@ -1429,6 +1430,11 @@ class AppMeshClient(metaclass=abc.ABCMeta):
|
|
1429
1430
|
header[self.HTTP_HEADER_KEY_X_TARGET_HOST] = self.forward_to + ":" + str(parse.urlsplit(self.auth_server_url).port)
|
1430
1431
|
header[self.HTTP_HEADER_KEY_USER_AGENT] = self.HTTP_USER_AGENT
|
1431
1432
|
|
1433
|
+
# Convert body to JSON string if it's a dict or list
|
1434
|
+
if isinstance(body, (dict, list)):
|
1435
|
+
body = json.dumps(body)
|
1436
|
+
header.setdefault("Content-Type", "application/json")
|
1437
|
+
|
1432
1438
|
try:
|
1433
1439
|
if method is AppMeshClient.Method.GET:
|
1434
1440
|
return self.session.get(url=rest_url, params=query, headers=header, cert=self.ssl_client_cert, verify=self.ssl_verify, timeout=self.rest_timeout)
|
@@ -1437,7 +1443,7 @@ class AppMeshClient(metaclass=abc.ABCMeta):
|
|
1437
1443
|
url=rest_url,
|
1438
1444
|
params=query,
|
1439
1445
|
headers=header,
|
1440
|
-
data=
|
1446
|
+
data=body,
|
1441
1447
|
cert=self.ssl_client_cert,
|
1442
1448
|
verify=self.ssl_verify,
|
1443
1449
|
timeout=self.rest_timeout,
|
appmesh/tcp_client.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# TCP-based App Mesh Client
|
2
|
-
# pylint: disable=line-too-long,broad-exception-raised,
|
2
|
+
# pylint: disable=line-too-long,broad-exception-raised,broad-exception-caught,import-outside-toplevel,protected-access
|
3
3
|
|
4
4
|
import json
|
5
5
|
import os
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: appmesh
|
3
|
-
Version: 1.5.
|
3
|
+
Version: 1.5.6
|
4
4
|
Summary: Client SDK for App Mesh
|
5
5
|
Home-page: https://github.com/laoshanxi/app-mesh
|
6
6
|
Author: laoshanxi
|
@@ -102,7 +102,7 @@ Refer to the [Installation doc](https://app-mesh.readthedocs.io/en/latest/Instal
|
|
102
102
|
| GUI | √ | √ |
|
103
103
|
| Virtual Network | | √ |
|
104
104
|
| Monitor tools | √ | √ |
|
105
|
-
|
|
105
|
+
| [Remote API call](https://app-mesh.readthedocs.io/en/latest/RemoteTask.html) | √ | |
|
106
106
|
|
107
107
|
---
|
108
108
|
|
@@ -3,11 +3,11 @@ appmesh/app.py,sha256=9Q-SOOej-MH13BU5Dv2iTa-p-sECCJQp6ZX9DjWWmwE,10526
|
|
3
3
|
appmesh/app_output.py,sha256=JK_TMKgjvaw4n_ys_vmN5S4MyWVZpmD7NlKz_UyMIM8,1015
|
4
4
|
appmesh/app_run.py,sha256=9ISKGZ3k3kkbQvSsPfRfkOLqD9xhbqNOM7ork9F4w9c,1712
|
5
5
|
appmesh/appmesh_client.py,sha256=0ltkqHZUq094gKneYmC0bEZCP0X9kHTp9fccKdWFWP0,339
|
6
|
-
appmesh/http_client.py,sha256=
|
7
|
-
appmesh/tcp_client.py,sha256=
|
6
|
+
appmesh/http_client.py,sha256=9PUGuo2YCv1KYVeDhYxFegeEGSBqoSim3UK9OJHEsnU,59143
|
7
|
+
appmesh/tcp_client.py,sha256=yi0n2NpBBCA-JHYWQPPE_1euE7Oz6JHBe1op7lypTXY,10999
|
8
8
|
appmesh/tcp_messages.py,sha256=w1Kehz_aX4X2CYAUsy9mFVJRhxnLQwwc6L58W4YkQqs,969
|
9
9
|
appmesh/tcp_transport.py,sha256=-XDTQbsKL3yCbguHeW2jNqXpYgnCyHsH4rwcaJ46AS8,8645
|
10
|
-
appmesh-1.5.
|
11
|
-
appmesh-1.5.
|
12
|
-
appmesh-1.5.
|
13
|
-
appmesh-1.5.
|
10
|
+
appmesh-1.5.6.dist-info/METADATA,sha256=k241QBT0-fxg36SOh4Y3qHLkYwTkjUgXPRJxYHZ38oY,11768
|
11
|
+
appmesh-1.5.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
12
|
+
appmesh-1.5.6.dist-info/top_level.txt,sha256=-y0MNQOGJxUzLdHZ6E_Rfv5_LNCkV-GTmOBME_b6pg8,8
|
13
|
+
appmesh-1.5.6.dist-info/RECORD,,
|
File without changes
|
File without changes
|