title: Swift GET request with parameters
body: <p>I'm very new to swift, so I will probably have a lot of faults in my code but what I'm trying to achieve is send a <code>GET</code> request to a localhost server with paramters. More so I'm trying to achieve it given my function take two parameters <code>baseURL:string,params:NSDictionary</code>. I am not sure how to combine those two into the actual URLRequest ? Here is what I have tried so far</p>
  
  <pre><code>    func sendRequest(url:String,params:NSDictionary){
         let urls: NSURL! = NSURL(string:url)
         var request = NSMutableURLRequest(URL:urls)
         request.HTTPMethod = "GET"
         var data:NSData! =  NSKeyedArchiver.archivedDataWithRootObject(params)
         request.HTTPBody = data
         println(request)
         var session = NSURLSession.sharedSession()
         var task = session.dataTaskWithRequest(request, completionHandler:loadedData)
         task.resume()
  
      }
  
  }
  
  func loadedData(data:NSData!,response:NSURLResponse!,err:NSError!){
      if(err != nil){
          println(err?.description)
      }else{
          var jsonResult: NSDictionary = NSJSONSerialization.JSONObjectWithData(data, options: NSJSONReadingOptions.MutableContainers, error: nil) as NSDictionary
          println(jsonResult)
  
      }
  
  }
  </code></pre>