- request(): drop params: Any? and jsonEncoding:; add body: (any HTTPBody)? and pathParams: [String: String] - remove legacy magic-"file" multipart branch (-> upload() in T6) and the now-unused mimeTypeForPath - decompose into makeURL / buildRequest / attach / send / classify / decodeResponse / friendlyError (each < 30 lines) - headers now merge over defaults (custom wins per key) instead of replacing - fix unbounded persistConnection recursion on permanent 4xx: cap at maxPersistRetries (3) - APIRequestTests: 7 cases over StubURLProtocol
123 lines
4.5 KiB
Swift
123 lines
4.5 KiB
Swift