morpheme_http 1.2.0 copy "morpheme_http: ^1.2.0" to clipboard
morpheme_http: ^1.2.0 copied to clipboard

Future-based library for making HTTP requests modified from http package.

example/main.dart

// ignore_for_file: avoid_print

import 'package:morpheme_http/morpheme_http.dart';

void main(List<String> args) async {
  final http = MorphemeHttp();

  try {
    final response = await http.post(
      Uri.parse('https://reqres.in/api/login'),
      body: {"email": "eve.holt@reqres.in", "password": "cityslicka"},
    );
    print(response.body);
  } on MorphemeException catch (e) {
    final failure = e.toMorphemeFailure();
    print(failure.toString());
  } catch (e) {
    print(e.toString());
  }
}
2
likes
0
pub points
56%
popularity

Publisher

verified publishermorpheme.design

Future-based library for making HTTP requests modified from http package.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

equatable, flutter, hive, http, logger, morpheme_inspector, path_provider, uuid

More

Packages that depend on morpheme_http