mirror of
https://ghfast.top/https://github.com/StarCitizenToolBox/app.git
synced 2025-09-14 03:21:11 +08:00
Init
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user