         }
         return nil
     }
-    
+
+    private class func handleBoundary(partData: inout NSMutableData,
+                                      currentPart: inout Part, parts: inout [Part]) -> ParseState {
+        if partData.length > 0 {
+            if let parser = getParsingFunction(contentType: currentPart.type),
+                let parsedBody = parser(partData) {
+                currentPart.body = parsedBody
+            } else {
+                currentPart.body = .raw(partData)
+            }
+            parts.append(currentPart)
+        }
+        currentPart = Part()
+        partData = NSMutableData()
+        return .body
+    }
+
     private class func divideDataByNewLines(data: NSData, newLineData: NSData) -> [NSData] {
         var dataLines = [NSData]()
         var lineStart = 0

            Log.error("Error converting strings to data for multipart parsing")
            return nil
        }
        
        enum ParseState {
            case preamble, body
        }
        var state = ParseState.preamble
        var parts: [Part] = []
        var currentPart = Part()

        }
        return nil
    }

    private enum ParseState {
        case preamble, body
    }

    ///
    /// Multipart form data parse function
    ///
