[swift]: support uuid in FormDataEncoding (#13228)

This commit is contained in:
Julian Kalinowski
2022-08-29 12:43:47 +02:00
committed by GitHub
parent 27f3a5c36d
commit 2c0d886a1d
17 changed files with 169 additions and 0 deletions

View File

@@ -496,6 +496,17 @@ private class FormDataEncoding: ParameterEncoding {
data: data
)
case let uuid as UUID:
if let data = uuid.uuidString.data(using: .utf8) {
urlRequest = configureDataUploadRequest(
urlRequest: urlRequest,
boundary: boundary,
name: key,
data: data
)
}
default:
fatalError("Unprocessable value \(value) with key \(key)")
}