feat: [RustHTTP] DNS Host Map

This commit is contained in:
2024-03-12 20:07:06 +08:00
parent 51393317b1
commit 26b58324c4
11 changed files with 262 additions and 40 deletions

View File

@ -36,10 +36,14 @@ pub fn set_default_header(headers: HashMap<String, String>) {
pub async fn fetch(method: MyMethod,
url: String,
headers: Option<HashMap<String, String>>,
input_data: Option<Vec<u8>>) -> anyhow::Result<RustHttpResponse> {
http_package::fetch(_my_method_to_hyper_method(method), url, headers, input_data).await
input_data: Option<Vec<u8>>, with_ip_address: Option<String>) -> anyhow::Result<RustHttpResponse> {
http_package::fetch(_my_method_to_hyper_method(method), url, headers, input_data, with_ip_address).await
}
pub async fn dns_lookup_txt(host: String) -> anyhow::Result<Vec<String>> {
http_package::dns_lookup_txt(host).await
}
pub async fn dns_lookup_ips(host: String) -> anyhow::Result<Vec<String>> {
http_package::dns_lookup_ips(host).await
}