Skip to content

Structured Fields is RFC 8941 now! #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ Provides parsing and serialization facilities for structured header fields, as w

## About Structured Header Fields

HTTP Structured Header fields are [a draft specification](https://tools.ietf.org/html/draft-ietf-httpbis-header-structure-19) being worked on by the IETF. They provide a set of data types and algorithms for handling HTTP header field values in a consistent way, allowing a single parser and serializer to handle a wide range of header field values.
HTTP Structured Header fields are a HTTP extension recorded in [RFC 8941](https://www.rfc-editor.org/rfc/rfc8941.html) . They provide a set of data types and algorithms for handling HTTP header field values in a consistent way, allowing a single parser and serializer to handle a wide range of header field values.

## Swift HTTP Structured Header Fields

This package provides a parser and serializer that match draft 19 of the working group's draft specification. They are entirely complete, able to handle all valid HTTP structured header fields. This package also provides `Encoder` and `Decoder` objects for working with Codable in Swift. This allows rapid prototyping and experimentation with HTTP structured header fields, as well as interaction with the wider Swift Codable community.
This package provides a parser and serializer that implement RFC 8941. They are entirely complete, able to handle all valid HTTP structured header fields. This package also provides `Encoder` and `Decoder` objects for working with Codable in Swift. This allows rapid prototyping and experimentation with HTTP structured header fields, as well as interaction with the wider Swift Codable community.

This package provides two top-level modules: `StructuredHeaders` and `CodableStructuredHeaders`.

Expand All @@ -24,7 +24,7 @@ In most cases users should prefer to use `CodableStructuredHeaders` unless they

## Working with Structured Header Fields

`swift-http-structured-headers` has a simply, easy-to-use high-level API for working with structured header fields. To begin with, let's consider the [HTTP Client Hints draft specification](https://tools.ietf.org/html/draft-ietf-httpbis-client-hints-15). This defines the following new header field:
`swift-http-structured-headers` has a simply, easy-to-use high-level API for working with structured header fields. To begin with, let's consider the [HTTP Client Hints specification](https://www.rfc-editor.org/rfc/rfc8942.html). This defines the following new header field:

> The Accept-CH response header field indicates server support for the hints indicated in its value. Servers wishing to receive user agent information through Client Hints SHOULD add Accept-CH response header to their responses as early as possible.
>
Expand Down
2 changes: 1 addition & 1 deletion Sources/StructuredHeaders/FieldParser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ extension StructuredFieldParser {

/// Parse the HTTP structured field as a list.
///
/// This is a straightforward implementation of the parser in the draft spec.
/// This is a straightforward implementation of the parser in the spec.
///
/// - throws: If the field could not be parsed.
/// - returns: An array of items or inner lists.
Expand Down