title: Why it is giving me code:400 and connection close?
body: <p>Response: </p>
  
  <blockquote>
    <p>Optional({ URL: myurllink } { status code: 400, headers {     Connection = close;     "Content-Language" = en;     "Content-Length" = 1105;     "Content-Type" = "text/html;charset=utf-8"; </p>
  </blockquote>
  
  <p>Code below:</p>
  
  <pre><code>var request = NSMutableURLRequest(URL: NSURL(string: "http://www.myurl/")!)
  var session = NSURLSession.sharedSession()
  request.HTTPMethod = "POST"
  
  var params1 = ["dailyspecial_name" : dailyspecial_name.text!,
                "dailyspecial_description" : dailyspecial_description.text!,
                "dailyspecial_type" :dailyspecial_type.text!]
  
  var params = ["data" : params1,"label" : ""] as Dictionary&lt;String, AnyObject&gt;
  var err: NSError?
  request.HTTPBody = (try!NSJSONSerialization.dataWithJSONObject(params, options:  NSJSONWritingOptions()))
  request.addValue("application/json", forHTTPHeaderField: "Content-Type")
  request.addValue("application/json", forHTTPHeaderField: "Accept")
  
  var task = session.dataTaskWithRequest(request, completionHandler: {data, response, error -&gt; Void in
      print("Response: \(response)")
      var strData = NSString(data: data!, encoding: NSUTF8StringEncoding)
      print("Body: \(strData)")
      var err: NSError?
      var json = (try!NSJSONSerialization.JSONObjectWithData(data!, options: .AllowFragments)) as? NSDictionary
  
      // Did the JSONObjectWithData constructor return an error? If so, log the error to the console
      if(err != nil) {
          print(err!.localizedDescription)
          let jsonStr = NSString(data: data!, encoding: NSUTF8StringEncoding)
          print("Error could not parse JSON: '\(jsonStr)'")
      }
      else {
          // The JSONObjectWithData constructor didn't return an error. But, we should still
          // check and make sure that json has a value using optional binding.
          if let parseJSON = json {
              // Okay, the parsedJSON is here, let's get the value for 'success' out of it
              var success = parseJSON["success"] as? Int
              print("Succes: \(success)")
          }
          else {
              // Woa, okay the json object was nil, something went worng. Maybe the server isn't running?
              let jsonStr = NSString(data: data!, encoding: NSUTF8StringEncoding)
              print("Error could not parse JSON: \(jsonStr)")
          }
      }
  })
  
  task.resume()
  </code></pre>