http_parser 3.1.1

  • Installing
  • Versions
  • 48

http_parser is a platform-independent package for parsing and serializing various HTTP-related formats. It's designed to be usable on both the browser and the server, and thus avoids referencing any types from dart:io or dart:html. It includes:

  • Support for parsing and formatting dates according to HTTP/1.1, the HTTP/1.1 standard.

  • A MediaType class that represents an HTTP media type, as used in Accept and Content-Type headers. This class supports both parsing and formatting media types according to HTTP/1.1.

  • A WebSocketChannel class that provides a StreamChannel interface for both the client and server sides of the WebSocket protocol independently of any specific server implementation.


  • Fix a logic bug in the chunkedCoding codec. It had been producing invalid output and rejecting valid input.



  • Support string_scanner 1.0.0.


  • Remove unnecessary dependencies.


  • All deprecated APIs have been removed. No new APIs have been added. Packages that would use 3.0.0 as a lower bound should use 2.2.0 instead—for example, http_parser: ">=2.2.0 <4.0.0".

  • Fix all strong-mode warnings.


  • Add support for crypto 1.0.0.



  • Added WebSocketChannel, an implementation of StreamChannel that's backed by a WebSocket.

  • Deprecated CompatibleWebSocket in favor of WebSocketChannel.


  • Removed the DataUri class. It's redundant with the getter that's coming in Dart 1.14, and the field in particular was an invalid override of that field.


  • The MIME spec says that media types and their parameter names are case-insensitive. Accordingly, MediaType now uses a case-insensitive map for its parameters and its type and subtype fields are now always lowercase.


This is 1.0.0 because the API is stable—there are no breaking changes.

  • Added an AuthenticationChallenge class for parsing and representing the value of WWW-Authenticate and related headers.

  • Added a CaseInsensitiveMap class for representing case-insensitive HTTP values.


  • Bring in the latest dart:io WebSocket code.


  • Add more detail to the readme.


  • Updated homepage URL.


  • Widen the version constraint on the collection package.


  • Widen the string_scanner version constraint.


  • Fix a library name conflict.


  • Fixes for HTTP date formatting.


  • Minor code refactoring.


  • Added CompatibleWebSocket, for platform- and API-independent support for the WebSocket API.

Use this package as a library

1. Depend on it

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

  http_parser: ^3.1.1

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:http_parser/http_parser.dart';
Version Uploaded Documentation Archive
3.1.3 Jul 19, 2018 Go to the documentation of http_parser 3.1.3 Download http_parser 3.1.3 archive
3.1.2 May 2, 2018 Go to the documentation of http_parser 3.1.2 Download http_parser 3.1.2 archive
3.1.1 Dec 15, 2016 Go to the documentation of http_parser 3.1.1 Download http_parser 3.1.1 archive
3.1.0 Dec 6, 2016 Go to the documentation of http_parser 3.1.0 Download http_parser 3.1.0 archive
3.0.3 Oct 12, 2016 Go to the documentation of http_parser 3.0.3 Download http_parser 3.0.3 archive
3.0.2 Jun 20, 2016 Go to the documentation of http_parser 3.0.2 Download http_parser 3.0.2 archive
3.0.1 May 19, 2016 Go to the documentation of http_parser 3.0.1 Download http_parser 3.0.1 archive
3.0.0 May 5, 2016 Go to the documentation of http_parser 3.0.0 Download http_parser 3.0.0 archive
2.2.1 Mar 23, 2016 Go to the documentation of http_parser 2.2.1 Download http_parser 2.2.1 archive
2.2.0 Mar 3, 2016 Go to the documentation of http_parser 2.2.0 Download http_parser 2.2.0 archive

All 24 versions...

Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.8.0 <2.0.0