hypertext 0.0.0

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 0

hypertext

version 0.0.0 build status

Alternative HTTP protocol library for Dart. The main difference here is that the developer gets a lot more freedom than with the dart:io implementation.

HTTP/2 support will come in the future.

Much of this library will work cross-platform, save for the Server class, as it depends on the dart:io ServerSocket class.

Why?

This package only exists for the case in which the current dart:io HTTP server API's are removed, say in Dart 2.0.0.

I doubt this will ever happen, but if it does, frameworks like Angel, won't suddenly explode.

Also, hypertext is really useful for, say, writing a proxy, because requests and responses can instantly be exported toHttp(). Writing reverse proxies with Dart for me has been cumbersome so far.

Missing Features

  • Cookies
  • WebSockets (although that would likely be another package, which would connect to web_socket_channel)

The following are deliberately left out:

  • Sessions

Features and bugs

Please file feature requests and bugs at the issue tracker.

Changelog

0.0.1

  • Initial version, created by Stagehand

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  hypertext: ^0.0.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:hypertext/hypertext.dart';
  
Version Uploaded Documentation Archive
0.0.0 Jan 11, 2017 Go to the documentation of hypertext 0.0.0 Download hypertext 0.0.0 archive
1.0.0-alpha Mar 10, 2017 Go to the documentation of hypertext 1.0.0-alpha Download hypertext 1.0.0-alpha archive
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
0
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
0
Overall:
Weighted score of the above. [more]
0
Learn more about scoring.

We analyzed this package on Dec 5, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.7

Platforms

Detected platforms:

Low code quality prevents platform classification.

Health issues and suggestions

Fix lib/src/http/server.dart. (-82.29 points)

Analysis of lib/src/http/server.dart failed with 6 errors, 1 hint, including:

line 28 col 23: Default values of an optional parameter must be constant.

line 28 col 23: Undefined name 'UTF8'.

line 32 col 27: Default values of an optional parameter must be constant.

line 32 col 27: Undefined name 'UTF8'.

line 41 col 31: Default values of an optional parameter must be constant.

Fix lib/src/http/parser.dart. (-57.81 points)

Analysis of lib/src/http/parser.dart failed with 3 errors:

line 13 col 7: Missing concrete implementation of StreamTransformer.cast.

line 17 col 26: Default values of an optional parameter must be constant.

line 17 col 26: Undefined name 'UTF8'.

Document public APIs (-10 points)

81 out of 81 API elements (library, class, field or method) have no adequate dartdoc content. Good documentation improves code readability and discoverability through search.

Fix lib/src/http/version.dart. (-0.50 points)

Analysis of lib/src/http/version.dart reported 1 hint:

line 12 col 12: Always override hashCode if overriding ==.

Fix additional 3 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/http.dart (Run dartfmt to format lib/http.dart.)
  • lib/hypertext.dart (Run dartfmt to format lib/hypertext.dart.)
  • lib/src/http/http.dart (Run dartfmt to format lib/src/http/http.dart.)

Maintenance issues and suggestions

Fix platform conflicts. (-20 points)

Low code quality prevents platform classification.

Use analysis_options.yaml. (-10 points)

Rename old .analysis_options file to analysis_options.yaml.

Read more about the setup of analysis-options.yaml.

Package is getting outdated. (-89.86 points)

The package was released 99 weeks ago.

The description is too short. (-20 points)

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

Package is pre-v0.1 release. (-10 points)

While there is nothing inherently wrong with versions of 0.0.*, it usually means that the author is still experimenting with the general direction of the API.

Maintain an example.

None of the files in your example/ directory matches a known example patterns. Common file name patterns include: main.dart, example.dart or you could also use hypertext.dart. Packages with multiple examples should use example/readme.md.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.19.0
body_parser ^1.0.0-dev 1.1.1
http_parser ^3.0.0 3.1.3
string_scanner ^1.0.0 1.0.4
Transitive dependencies
charcode 1.1.2
collection 1.14.11
dart2_constant 1.0.2+dart2
http_server 0.9.8+1
meta 1.1.6
mime 0.9.6+2
path 1.6.2
source_span 1.4.1
typed_data 1.1.6
Dev dependencies
angel_route ^1.0.0-dev
http ^0.11.0
test ^0.12.0