# -*- coding: utf-8 -*- import requests url = 'http://192.168.31.243:7745/api/image_data/data_list' params = { 'start_id': 5, 'end_id': 9, 'skip': 0, 'limit': 100 } headers = { 'accept': 'application/json' } try: response = requests.get(url, params=params, headers=headers) response.raise_for_status() # 打印响应内容 print("Status Code:", response.status_code) print("Response JSON:", response.json()) # 如果响应是JSON格式 # print("Response Text:", response.text) # 如果响应是纯文本 except requests.exceptions.RequestException as e: print(f"An error occurred: {e}")