Skip to content

Commit

Permalink
perf: Respond faster
Browse files Browse the repository at this point in the history
  • Loading branch information
TechDecryptor authored Oct 26, 2023
1 parent 2696422 commit 4a0162b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ pub fn translate(
_needs: HashMap<String, String>,
) -> Result<Value, Box<dyn Error>> {
let client = reqwest::blocking::ClientBuilder::new().build()?;
const URL: &str = "https://yi.qq.com/api/imt";
const URL: &str = "https://transmart.qq.com/api/imt";

let post_data = init_data(from, to, text);

let res:Value= client
.post(URL)
.header("Content-Type", "application/json")
.header("user-agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36")
.header("referer", "https://yi.qq.com/zh-CN/index")
.header("referer", "https://transmart.qq.com/zh-CN/index")
.body(post_data.to_string())
.send()?
.json()?;
Expand Down

0 comments on commit 4a0162b

Please sign in to comment.