|
@@ -5,15 +5,14 @@ import json
|
|
import base64
|
|
import base64
|
|
from itertools import chain
|
|
from itertools import chain
|
|
|
|
|
|
-url = 'http://192.168.199.27:18040'
|
|
|
|
-imgs_path = '../img'
|
|
|
|
|
|
+url = 'http://192.168.199.27:18060'
|
|
|
|
+imgs_path = '/Users/sxkj/to_md/img'
|
|
|
|
|
|
-def send_request(img_path, image_type = 0):
|
|
|
|
|
|
+def send_request(img_path):
|
|
with open(img_path, 'rb') as f:
|
|
with open(img_path, 'rb') as f:
|
|
img_str: str = base64.encodebytes(f.read()).decode('utf-8')
|
|
img_str: str = base64.encodebytes(f.read()).decode('utf-8')
|
|
data = {
|
|
data = {
|
|
- 'image': img_str,
|
|
|
|
- 'image_type': image_type
|
|
|
|
|
|
+ 'image': img_str
|
|
}
|
|
}
|
|
# idc_header = {
|
|
# idc_header = {
|
|
# 'Content-Type': 'application/json',
|
|
# 'Content-Type': 'application/json',
|