         }
         return request ?? r
     }
-    
+
+    func wsRequest(_ urlRequest: URLRequestConvertible) -> DataRequest {
+        let sessionManager = Alamofire.SessionManager.default
+        if let adapter = requestAdapter {
+            sessionManager.adapter = adapter
+        }
+        return sessionManager.request(urlRequest)
+    }
+
+    func wsUpload(
+        multipartFormData: @escaping (MultipartFormData) -> Void,
+        usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold,
+        with urlRequest: URLRequestConvertible,
+        encodingCompletion: ((SessionManager.MultipartFormDataEncodingResult) -> Void)?)
+    {
+        let sessionManager = Alamofire.SessionManager.default
+        if let adapter = requestAdapter {
+            sessionManager.adapter = adapter
+        }
+        return sessionManager.upload(
+            multipartFormData: multipartFormData,
+            usingThreshold: encodingMemoryThreshold,
+            with: urlRequest,
+            encodingCompletion: encodingCompletion
+        )
+    }
+
     /// Returns Promise containing JSON
     open func fetch() -> Promise<JSON> {
         return fetch().registerThen { (_, _, json) in json }

    open var postParameterEncoding: ParameterEncoding = URLEncoding()
    open var showsNetworkActivityIndicator = true
    open var errorHandler: ((JSON) -> Error?)?
    
    private let logger = WSLogger()
    
    fileprivate var req: DataRequest?//Alamofire.Request?

    func sendMultipartRequest(_ resolve: @escaping (_ result: (Int, [AnyHashable: Any], JSON)) -> Void,
                              reject: @escaping (_ error: Error) -> Void,
                              progress:@escaping (Float) -> Void) {
        wsUpload(multipartFormData: { formData in
            for (key, value) in self.params {
                let str: String
                switch value {
