mercury_client 1.0.0 copy "mercury_client: ^1.0.0" to clipboard
mercury_client: ^1.0.0 copied to clipboard

outdated

A Simple HTTP client (Web and Native support).

Mercury Client #

A Simple Dart HTTP client with Web and Native support.

Usage #

A simple usage example:

import 'package:mercury_client/mercury_client.dart';
import 'dart:async';

main() async {
  
  var client = HttpClient('http://gateway.your.domain/api-1') ;

  // Calling with POST method:
  // URL: http://gateway.your.domain/api-1/call-foo?var=123
  // Content-Type: application/json
  // Body:
  // { 'content': 'any' }}
  var response = await client.post("call-foo", parameters: {'var': '123'}, body: "{ 'content': 'any' }}", contentType: 'application/json') ;
  
  if ( response.isOK ) {
    print( response.body ) ;
  }

}

Mercury (mythology) #

Mercury is known to the Romans as Mercurius.

He is the god of financial gain, commerce, eloquence, messages, communication (including divination), travelers, boundaries, luck, trickery and thieves.

Features and bugs #

Please file feature requests and bugs at the issue tracker.

15
likes
0
pub points
75%
popularity

Publisher

unverified uploader

A Simple HTTP client (Web and Native support).

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

enum_to_string

More

Packages that depend on mercury_client