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

Create simple HTTP ETags.

Create simple HTTP ETags

Highly inspired from https://github.com/jshttp/etag , almost all the code and the documentation is taken from that project, all I did was to port the project over to dart.

API #

etag(entity, {bool? weak}) #

Generate a strong ETag for the given entity. This should be the complete body of the entity. Strings, Uint8Lists, and FileStat are accepted. By default, a strong ETag is generated except for FileStat, which will generate a weak ETag (this can be overwritten by weak).

weak

Specifies if the generated ETag will include the weak validator mark (that is, the leading W/). The actual entity tag is the same. The default value is false, unless the entity is fs.Stats, in which case it is true.

0
likes
130
pub points
76%
popularity

Publisher

unverified uploader

Create simple HTTP ETags.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

crypto

More

Packages that depend on etag