networking 0.0.10+1 copy "networking: ^0.0.10+1" to clipboard
networking: ^0.0.10+1 copied to clipboard

A general purpose HTTP Client for Dart, that is typed and error free.

networking #

A general purpose HTTP Client for Dart, that is typed and error free.

How to use #

Using the networking client for consuming GitHub Raw API, it is as simple as:

final repository = NetworkingGitHubRepository(
    user: 'dart-pacotes',
    repoId: 'networking',
    branch: 'master',
);

// Create networking client that interacts with GitHub Raw API
final networkingClient = RawGitHubNetworkingClient(
repository: repository,
);

final endpoint = 'README.md';

// Get README.md content
final getEndpointResult = await networkingClient.get(endpoint: endpoint);

// Tadaaaam!
print(getEndpointResult);

Features #

So far, the package offers an HTTP client that works on top of dart http package, providing support for GET, POST, PUT, DELETE and PATCH methods. There is typing for request errors and responses for most of the general used content-types.

Out-of-the-box it provides a client for consuming GitHub Raw API and Imgur REST API.

Missing features #

These are some of the features that live in the package backlog:

  • Middleware for HTTP requests and responses
  • WebSocket integration

Side Effects #

Powered by Dart null sound + dartz monads, this package is free of null issues and side effects. This is to prevent the throw of any exception that may not be known and caught by developers, and to make sure that information is consistent by contract.


Bugs and Contributions #

Found any bug (including typos) in the package? Do you have any suggestion or feature to include for future releases? Please create an issue via GitHub in order to track each contribution. Also, pull requests are very welcome!

2
likes
120
pub points
74%
popularity

Publisher

verified publisheroshanu.art

A general purpose HTTP Client for Dart, that is typed and error free.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

dartz, http, meta

More

Packages that depend on networking