https://github.com/hexer10/etag
Create simple HTTP ETags. Port over from JS.
https://github.com/hexer10/etag
dart etag pub
Last synced: about 1 year ago
JSON representation
Create simple HTTP ETags. Port over from JS.
- Host: GitHub
- URL: https://github.com/hexer10/etag
- Owner: Hexer10
- License: bsd-3-clause
- Created: 2021-03-24T20:47:18.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-03-24T21:00:53.000Z (over 5 years ago)
- Last Synced: 2025-06-14T22:46:00.087Z (about 1 year ago)
- Topics: dart, etag, pub
- Language: Dart
- Homepage: https://pub.dev/packages/etag
- Size: 4.88 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
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, `Uint8List`s, 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`.