2024-02-07 00:20:06 +08:00
|
|
|
// This file is automatically generated, so please do not edit it.
|
2024-09-23 21:09:04 +08:00
|
|
|
// @generated by `flutter_rust_bridge`@ 2.4.0.
|
2024-02-07 00:20:06 +08:00
|
|
|
|
|
|
|
// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import
|
|
|
|
|
|
|
|
import '../frb_generated.dart';
|
2024-02-07 19:32:36 +08:00
|
|
|
import '../http_package.dart';
|
2024-02-07 00:20:06 +08:00
|
|
|
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';
|
|
|
|
|
2024-06-11 19:55:35 +08:00
|
|
|
// These functions are ignored because they are not marked as `pub`: `_my_method_to_hyper_method`
|
2024-06-04 20:29:31 +08:00
|
|
|
|
|
|
|
Future<void> setDefaultHeader({required Map<String, String> headers}) =>
|
|
|
|
RustLib.instance.api.crateApiHttpApiSetDefaultHeader(headers: headers);
|
2024-02-07 00:20:06 +08:00
|
|
|
|
2024-02-07 19:32:36 +08:00
|
|
|
Future<RustHttpResponse> fetch(
|
|
|
|
{required MyMethod method,
|
|
|
|
required String url,
|
2024-02-07 00:20:06 +08:00
|
|
|
Map<String, String>? headers,
|
2024-02-07 19:32:36 +08:00
|
|
|
Uint8List? inputData,
|
2024-06-04 20:29:31 +08:00
|
|
|
String? withIpAddress}) =>
|
2024-05-22 20:05:50 +08:00
|
|
|
RustLib.instance.api.crateApiHttpApiFetch(
|
2024-02-07 19:32:36 +08:00
|
|
|
method: method,
|
|
|
|
url: url,
|
|
|
|
headers: headers,
|
|
|
|
inputData: inputData,
|
2024-06-04 20:29:31 +08:00
|
|
|
withIpAddress: withIpAddress);
|
2024-02-07 19:32:36 +08:00
|
|
|
|
2024-06-04 20:29:31 +08:00
|
|
|
Future<List<String>> dnsLookupTxt({required String host}) =>
|
|
|
|
RustLib.instance.api.crateApiHttpApiDnsLookupTxt(host: host);
|
2024-02-07 22:19:43 +08:00
|
|
|
|
2024-06-04 20:29:31 +08:00
|
|
|
Future<List<String>> dnsLookupIps({required String host}) =>
|
|
|
|
RustLib.instance.api.crateApiHttpApiDnsLookupIps(host: host);
|
2024-03-12 20:07:06 +08:00
|
|
|
|
2024-02-07 19:32:36 +08:00
|
|
|
enum MyMethod {
|
|
|
|
options,
|
|
|
|
gets,
|
|
|
|
post,
|
|
|
|
put,
|
|
|
|
delete,
|
|
|
|
head,
|
|
|
|
trace,
|
|
|
|
connect,
|
|
|
|
patch,
|
2024-04-16 19:29:19 +08:00
|
|
|
;
|
2024-02-07 19:32:36 +08:00
|
|
|
}
|