title: Alamofire with custom parameter encoding for swift application
body: <p>I have to call some methods from the soap web service in my swift application, so I think I should use custom parameter encoding, but when I create closure for this encoding it seems never to be called. Am I doing something wrong?</p>
  
  <p>Here is my code:</p>
  
  <pre><code>    let custom: (URLRequestConvertible, [String: AnyObject]?) -&gt; (NSURLRequest, NSError?) = {
          (URLRequest, parameters) in
          let mutableURLRequest = URLRequest.URLRequest.mutableCopy() as NSMutableURLRequest
          mutableURLRequest.setValue("text/xml; charset=utf-8", forHTTPHeaderField: "Content-Type")
          mutableURLRequest.HTTPBody = body
          return (mutableURLRequest, nil)
      }
  
      Alamofire.request(.POST, WebServiceURLString, parameters: nil, encoding: .Custom(custom)).responseString { (request, response, data, error) -&gt; Void in
          println(data)
      }
  </code></pre>