                 delegate.uploadProgress = progress
                 delegate.completionHandler = completionHandler
                 delegate.credential = credential
+                delegate.responseSerializer = responseSerializer
                 
                 self.delegate[task] = delegate
             }

    :param: parameters  the request parameters.
    :param: credential  the credentials to use for basic/digest auth (Note: it is advised that HTTPS should be used by default).
    :param: method       the method to be used, by default a .POST request.
    :param: progress     a block that will be invoked to report progress during upload.
    :param: completionHandler A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: The object created from the response data of request and the `NSError` object describing the network or parsing error that occurred.
    */
    public func upload(url: String,  data: NSData, parameters: [String: AnyObject]? = nil, credential: NSURLCredential? = nil, method: HttpMethod = .POST, progress: ProgressBlock?, completionHandler: CompletionBlock) {
        fileRequest(url, parameters: parameters, method: method, credential: credential, type: .Upload(.Data(data)), progress: progress, completionHandler: completionHandler)
    }
    
    /**

    - parameter parameters:  the request parameters.
    - parameter credential:  the credentials to use for basic/digest auth (Note: it is advised that HTTPS should be used by default).
    - parameter method:      the method to be used, by default a .POST request.
    - parameter responseSerializer: the actual response serializer to use upon receiving a response.
    - parameter progress:    a block that will be invoked to report progress during upload.
    - parameter completionHandler: A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: The object created from the response data of request and the `NSError` object describing the network or parsing error that occurred.
    */
    public func upload(url: String,  stream: NSInputStream,  parameters: [String: AnyObject]? = nil, credential: NSURLCredential? = nil, method: HttpMethod = .POST, responseSerializer: ResponseSerializer? = nil, progress: ProgressBlock?, completionHandler: CompletionBlock) {
        fileRequest(url, parameters: parameters, method: method, credential: credential, responseSerializer: responseSerializer, type: .Upload(.Stream(stream)), progress: progress, completionHandler: completionHandler)
    }
    
    
