def ExecuteWithPostData_JSON(session_id, uri, sub_url, timeout, post_data, get_method):
headers = CreateHeadersWithSessionCookieAndCustomHeader(session_id)
headers["Content-Type"] = "application/json; charset=UTF-8"
if isinstance(post_data, dict) or isinstance(post_data, list):
post_data = json.dumps(post_data, separators=(',', ':'))
post_data = post_data.encode('utf-8')
return ExecuteWebRequest(uri + sub_url, post_data, headers, timeout, get_method)
评论列表
文章目录