title: Login with Alamofire post method
body: <p>I am trying to login like that code:</p>
  
  <pre><code>let loginRequest = [
          "UserName" : self.txtUserName.text! as String,
          "Password" : self.txtPassword.text! as String
      ]
  
      let serverUrl = ServerPath.Path + "/Test/login"
  
      Alamofire.request(.POST, serverUrl, parameters: loginRequest,encoding: .JSON).responseJSON
          {
              response in switch response.result {
              case .Success(let data):
              ...
              ...
               case .Failure(let error):
                  print("Request failed with error: \(error)")
          }
  </code></pre>
  
  <p>always getting error</p>
  
  <blockquote>
    <p>Request failed with error: Error Domain=NSCocoaErrorDomain Code=3840
    "Invalid value around character 0."
    UserInfo={NSDebugDescription=Invalid value around character 0.}</p>
  </blockquote>
  
  <p>but I'm trying to static like that operation completed as success</p>
  
  <pre><code>let loginRequest = [
          "UserName" : "Test",
          "Password" : "123"
      ]
  </code></pre>