Hot answers tagged

2

You should separate concerns whenever possible. Since BLE & HTTP requests are quite different, you could write the following protocols: protocol Request { associatedtype Provider var provider: Provider { get } func execute() } protocol BLERequest: Request { typealias Provider = BLEProvider var code: UInt { get } var ...


1

I am not sure this question can still be salvaged as some relevant details are missing. One opening remark though: HTTP header fields are case-insensitive, as stipulated by several RFCs, including RFC 7230 (See 3.2. Header Fields). Each header field consists of a case-insensitive field name followed by a colon (":"), optional leading whitespace, the ...


Only top voted, non community-wiki answers of a minimum length are eligible