This commit is contained in:
2024-09-04 17:18:13 +08:00
parent 3da318ec71
commit 74fe0457f0
276 changed files with 901 additions and 14439 deletions

View File

@@ -17,10 +17,7 @@ class RSHttp {
static Future<RustHttpResponse> get(String url,
{Map<String, String>? headers, String? withIpAddress}) async {
final r = await rust_http.fetch(
method: MyMethod.gets,
url: url,
headers: headers,
withIpAddress: withIpAddress);
method: MyMethod.gets, url: url, headers: headers);
return r;
}
@@ -42,29 +39,14 @@ class RSHttp {
headers["Content-Type"] = contentType;
}
final r = await rust_http.fetch(
method: MyMethod.post,
url: url,
headers: headers,
inputData: data,
withIpAddress: withIpAddress);
method: MyMethod.post, url: url, headers: headers, inputData: data);
return r;
}
static Future<RustHttpResponse> head(String url,
{Map<String, String>? headers, String? withIpAddress}) async {
final r = await rust_http.fetch(
method: MyMethod.head,
url: url,
headers: headers,
withIpAddress: withIpAddress);
method: MyMethod.head, url: url, headers: headers);
return r;
}
static Future<List<String>> dnsLookupTxt(String host) async {
return await rust_http.dnsLookupTxt(host: host);
}
static Future<List<String>> dnsLookupIps(String host) async {
return await rust_http.dnsLookupIps(host: host);
}
}