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
2017-05-30 15:37:23 -05:00
2017-05-30 15:37:23 -05:00
2017-06-14 13:44:45 +01:00
2017-05-30 15:37:23 -05:00

SwiftServerHttp

Sample prototype implementation of @weissi's HTTP Sketch v2 from https://lists.swift.org/pipermail/swift-server-dev/Week-of-Mon-20170403/000422.html for discussion.

S
Description
⚠️ Historical HTTP API - please use https://github.com/swift-server/async-http-client instead
Readme Apache-2.0 1.2 MiB
Languages
Swift 68.8%
C 31.2%