     
         :returns: Encoded version of of string it was called as.
     */
-    func escapeStr() -> String {
-        var raw: NSString = self
-        var str = CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault,raw,"[].",":/?&=;+!@#$()',*",CFStringConvertNSStringEncodingToEncoding(NSUTF8StringEncoding))
-        return str as NSString
+    var escaped: String {
+        return CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault,self,"[].",":/?&=;+!@#$()',*",CFStringConvertNSStringEncodingToEncoding(NSUTF8StringEncoding))
     }
 }
 

    
    ///helper method to create the multi form headers
    func multiFormHeader(name: String, fileName: String?, type: String?, multiCRLF: String) -> String {
        var str = "Content-Disposition: form-data; name=\"\(name.escapeStr())\""
        if fileName != nil {
            str += "; filename=\"\(fileName!)\""
        }

        func stringValue() -> String {
            var val = getValue()
            if self.key == nil {
                return val.escaped
            }
            return "\(self.key.escaped)=\(val.escaped)"
        }
        
    }
