app/lib/common/rust/api/http_api.dart

35 lines
985 B
Dart
Raw Permalink Normal View History

2024-02-07 00:20:06 +08:00
// This file is automatically generated, so please do not edit it.
2024-09-04 12:22:13 +08:00
// Generated by `flutter_rust_bridge`@ 2.3.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-09-04 17:18:13 +08:00
Uint8List? inputData}) =>
2024-05-22 20:05:50 +08:00
RustLib.instance.api.crateApiHttpApiFetch(
2024-09-04 17:18:13 +08:00
method: method, url: url, headers: headers, inputData: inputData);
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
}