4 Commits

Author SHA1 Message Date
Arjun Nayini 728b66d569 Lint and Clean up code (#84) 2017-11-07 11:34:33 -08:00
Ian Partridge 6c0317d239 Add .swiftlint.yml and clean up project (#33) 2017-08-24 18:15:50 +01:00
Chris Bailey 8f1f900474 Add initial set of Jazzy docs (#24) 2017-08-13 08:03:55 +01:00
aleksey-mashanov 7e366e4687 Make HTTPHeaders more user-friendly (#14)
* Make HTTPHeaders more user-friendly

* Header name is a struct conforming to `ExpressibleByStringLiteral`.
  Standard header names are available through static constants.
  This allows to save some CPU on lowercasing and hash value
  calculation.

* Original headers are stored until first modification. Iterator
  of `HTTPHeaders` iterates over original headers while they are actual,
  in other case it iterates over underlying mutable dictionary.

* Default subscript returns values of all headers with the same
  name concatenated with comma [RFC7230, section 3.2.2], except
  for "Set-Cookie" for which only first value is returned.

* As-is values of all headers with same name can be accessed
  through subscript with label `valuesFor`.

* append() method is modified to accept dictionary literal.
  replace() method is added.

* Split HTTPHeaders implementation to separate extensions
2017-06-28 12:54:41 +01:00