Repository navigation
Abstract API: add declarative TLS request option to AHC and DefaultHTTPClient - #168
nakulbajaj wants to merge 2 commits into
Conversation
0f8ac96 to
c117bd8
Compare
| // | ||
| //===----------------------------------------------------------------------===// | ||
|
|
||
| public import HTTPAPIs |
There was a problem hiding this comment.
These imports are not necessary since they were already reexported
| @available(anyAppleOS 26.0, *) | ||
| extension HTTPClientCapability { | ||
| /// A protocol for HTTP request options that support TLS policies. | ||
| public protocol DeclarativeTLS: RequestOptions { |
There was a problem hiding this comment.
Probably want to discuss the naming a bit more
There was a problem hiding this comment.
I agree both on the protocol name but also on the name of TrustEvaluationPolicy. We would normally call this ServerCertificateVerification
There was a problem hiding this comment.
Thoughts on DeclarativeServerTrust? Do we think it would be best for a protocol such as this one to have a matching protocol and property name, since we would only ever have a single property in here?
I think ServerCertificateVerification is fine for the type name
FranzBusch
left a comment
There was a problem hiding this comment.
Can we update this once we get #192 merged.
Adding the declarative TLS request option to the abstract API and making sure AHC and thus DefaultHTTPClient support it for all platforms.
Longer term, we should also add an imperative option for cert validation.