         return encoded as Data
     }
 
-    private func encodeHeaderData(for bodyPart: BodyPart) -> Data {
+    private func encodeHeaders(for bodyPart: BodyPart) -> Data {
         var headerText = ""
 
         for (key, value) in bodyPart.headers {

        if let bodyPartError = bodyPartError {
            throw bodyPartError
        }


        if FileManager.default.fileExists(atPath: fileURL.path) {
            let failureReason = "A file already exists at the given file URL: \(fileURL)"


    // MARK: - Private - Content Headers

    private func contentHeaders(withName name: String, fileName: String? = nil, mimeType: String? = nil) -> [String: String] {
        var disposition = "form-data; name=\"\(name)\""
        if let fileName = fileName { disposition += "; filename=\"\(fileName)\"" }

        var headers = ["Content-Disposition": disposition]
        if let mimeType = mimeType { headers["Content-Type"] = mimeType }

        return headers
    }

    // MARK: - Private - Boundary Encoding
