1pub mod client;
6pub mod config;
7pub mod init;
8
9pub use client::{build_client, c, delete, get, head, patch, post, put};
10pub use config::XHttpConfig;
11
12use std::sync::atomic::{AtomicBool, Ordering};
13
14static REGISTERED: AtomicBool = AtomicBool::new(false);
16
17pub fn register_hook() {
21 if REGISTERED
22 .compare_exchange(false, true, Ordering::SeqCst, Ordering::SeqCst)
23 .is_err()
24 {
25 return;
26 }
27
28 crate::before_start!(init::init_xhttp, crate::xhook::HookOptions::new().order(40));
29}