title: NSURLSession send parameters with get
body: <p>I'm trying to parse information from a php, but i need to send a dictionary parameter so i try things ... i saw tutorials,examples but i'm stuck so i went back to the start: (What it's the good way for do this?)</p>
  
  <pre><code>       func asd(){
      let urlPath = "http://xxxxx.php"
  
      let url: NSURL = NSURL(string: urlPath)
  
      let request = NSMutableURLRequest(URL: url)
      request.HTTPMethod = "GET"
      var parm = ["id_xxxx": "900"] as Dictionary
  
  
      //I THINK MY PROBLEM IT'S HERE! i dont know how to link parm with session, i try is with session.uploadTaskWithRequest(&lt;#request: NSURLRequest?#&gt;, fromData: &lt;#NSData?#&gt;) but doesn't work
  
      let session = NSURLSession.sharedSession()
      let task = session.dataTaskWithURL(url, completionHandler: {data, response, error -&gt; Void in
          println("Task completed")
          if(error) {
              // If there is an error in the web request, print it to the console
              println(error.localizedDescription)
          }
          var err: NSError?
          var jsonResult = NSJSONSerialization.JSONObjectWithData(data, options: NSJSONReadingOptions.MutableContainers, error: &amp;err) as NSDictionary
          if(err?) {
              // If there is an error parsing JSON, print it to the console
              println("JSON Error \(err!.localizedDescription)")
          }
          println(jsonResult.debugDescription)
          let results: NSArray = jsonResult["x"] as NSArray
          dispatch_async(dispatch_get_main_queue(), {
              self.tableData = results
              self.OfertaGridViewLista!.reloadData()
              })
          })
      task.resume()
  }
  </code></pre>
  
  <p>Thanks!</p>