Lucu-0.5: HTTP Daemonic Library

Network.HTTP.Lucu.ETag

Description

Manipulation of entity tags.

Synopsis

Documentation

data ETag Source

An entity tag is made of a weakness flag and a opaque string.

Constructors

ETag 

Fields

etagIsWeak :: !Bool

The weakness flag. Weak tags looks like W/"blahblah" and strong tags are like "blahblah".

etagToken :: !String

An opaque string. Only characters from 0x20 (sp) to 0x7e (~) are allowed.

Instances

strongETag :: String -> ETagSource

This is equivalent to ETag False. If you want to generate an ETag from a file, try using Network.HTTP.Lucu.StaticFile.generateETagFromFile.

weakETag :: String -> ETagSource

This is equivalent to ETag True.