|
|
@@ -10,7 +10,7 @@ use serde_json::Value;
|
|
|
use crate::http_tool::RestTool;
|
|
|
use crate::response_base::ResponseData;
|
|
|
use sha2::{Digest, Sha256};
|
|
|
-use tracing::{error};
|
|
|
+use tracing::{error, info};
|
|
|
|
|
|
#[derive(Clone)]
|
|
|
pub struct CoinexSwapRest {
|
|
|
@@ -632,14 +632,13 @@ impl CoinexSwapRest {
|
|
|
|
|
|
let is_success = response.status().is_success(); // 先检查状态码
|
|
|
let text = response.text().await.unwrap();
|
|
|
-
|
|
|
+ info!("url: {}, 原始http响应字符串:res: {}", url, text);
|
|
|
let data_json: Value = serde_json::from_str(text.as_str()).unwrap();
|
|
|
return if is_success && data_json["code"].to_string() == "0" {
|
|
|
self.on_success_data(data_json["data"].clone())
|
|
|
} else {
|
|
|
self.on_error_data(&text, &url, &body)
|
|
|
};
|
|
|
-
|
|
|
}
|
|
|
|
|
|
pub fn on_success_data(&mut self, text: Value) -> ResponseData {
|