Skip to content

Commit

Permalink
Adding additional examples
Browse files Browse the repository at this point in the history
  • Loading branch information
nyamsprod committed Nov 17, 2024
1 parent a6f01cb commit 8ef4a01
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/02-parsing-serializing.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,17 @@ the data type system.
| InnerList | class `InnerList` | `DataType::InnerList` | `innerlist` |
| Parameters | class `Parameters` | `DataType::Parameters` | `parameters` |

As example the following existing headers can be classified within the Structured Fields:

- The `Keep-Alive` header is a `Dictionary`
- The `Accept` headers are `List`
- The `Content-Type` header is an `Item`

These example are taken from a list of [already supported fields](https://httpwg.org/http-extensions/draft-ietf-httpbis-retrofit.html)

> [!NOTE]
> This means that those headers are already supported when parsing or serializing them by the package
All the classes share the same methods for parsing the HTTP text representation of the field. They all use
the `fromHttpValue` named constructor. This method will parse the field string representation and
return an instantiated PHP class containing the parsing result. Because there are 2 RFC related
Expand Down

0 comments on commit 8ef4a01

Please sign in to comment.