Explorar el Código

Update how we turn strings into data.

Jon Shier hace 7 años
padre
commit
86e5a5fb35
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      Source/MultipartFormData.swift

+ 2 - 2
Source/MultipartFormData.swift

@@ -70,8 +70,8 @@ open class MultipartFormData {
             case .final:
                 boundaryText = "\(EncodingCharacters.crlf)--\(boundary)--\(EncodingCharacters.crlf)"
             }
-
-            return boundaryText.data(using: String.Encoding.utf8, allowLossyConversion: false)!
+            
+            return Data(boundaryText.utf8)
         }
     }