altsvc-0.1.0.0: HTTP Alternative Services

LicenseBSD-style
MaintainerOlivier Chéron <olivier.cheron@gmail.com>
Stabilitystable
Portabilitygood
Safe HaskellNone
LanguageHaskell2010

Network.HTTP.AltSvc

Description

HTTP Alternative Services, defined in RFC 7838.

Synopsis

Documentation

newtype AltSvc Source #

Data type to represent the Alt-Svc header content. It generally contains one or more values. An empty list is also possible and allows to invalidate all alternatives, which is different from providing no header at all.

The content can be encoded to/decoded from bytestring using the Serialize instance.

Constructors

AltSvc [AltValue] 
Instances
Eq AltSvc Source # 
Instance details

Defined in Network.HTTP.AltSvc

Methods

(==) :: AltSvc -> AltSvc -> Bool #

(/=) :: AltSvc -> AltSvc -> Bool #

Show AltSvc Source # 
Instance details

Defined in Network.HTTP.AltSvc

Serialize AltSvc Source # 
Instance details

Defined in Network.HTTP.AltSvc

data AltValue Source #

An individual service in the Alt-Svc header.

The content can be encoded to/decoded from bytestring using the Serialize instance.

Constructors

AltValue 

Fields

  • altValueProtocolId :: ByteString

    The protocol to use for the alternative service. Has the syntax of an ALPN protocol name and cannot be empty.

  • altValueHost :: ByteString

    Host name to connect to the alternative service. Is optional so may be empty.

  • altValuePort :: Int

    Port number to connect to the alternative service. Is mandatory and cannot be negative.

  • altValueParams :: [(ByteString, ByteString)]

    Additional parameters for the alternative. The parameter names must be valid tokens, which means no delimiter character is accepted, and cannot be empty. The values may be any bytestring.

Instances
Eq AltValue Source # 
Instance details

Defined in Network.HTTP.AltSvc

Show AltValue Source # 
Instance details

Defined in Network.HTTP.AltSvc

Serialize AltValue Source # 
Instance details

Defined in Network.HTTP.AltSvc