title: URL Encoding in AlamoFire 4.X
body: <p>I'm trying to get a JPG file from a public webserver without any kind of authentication. Coding is done in Swift 3 with AlamoFire 4.4</p>
  
  <p>urlString has following value:
  <a href="https://drscdn.500px.org/photo/36406120/m%3D900_k%3D1_a%3D1/v2?client_application_id=29771&amp;webp=true&amp;sig=97ac488f1336f41d9f3e4a67e6bf99b3bd1aadfb6c9631a6097ff5b4a729a94e" rel="nofollow noreferrer">https://drscdn.500px.org/photo/36406120/m%3D900_k%3D1_a%3D1/v2?client_application_id=29771&amp;webp=true&amp;sig=97ac488f1336f41d9f3e4a67e6bf99b3bd1aadfb6c9631a6097ff5b4a729a94e</a></p>
  
  <pre><code>        let url = URL(string: urlString)
          let myParameters: [String : AnyObject]  = ["myImage": image, "myBlurredImage": blurredImage, "index": index as AnyObject]
          let croppedSize = CGSize(width: self.scrollViewWidth!, height: self.scrollViewHeight!)
          self.apicounterPerRequest += 1
  
  
          Alamofire.request(url!, method: .get, parameters: myParameters, encoding: URLEncoding.default)
              .validate()
              .response { response in
                  let myImage = myParameters["myImage"] as! UIImageView
                  let myBlurredImage = myParameters["myBlurredImage"] as! UIImageView
                  let index = myParameters["index"] as! Int
                  if let downloadedImage = UIImage(data: response.data!) {
                      myImage.image = downloadedImage
                      self.displayed500PxPhoto[index].uiimage = downloadedImage
                      myBlurredImage.image = PhotoManager.imageWithSize(downloadedImage, size: croppedSize)
                      completion({
                          print("Done Downloading")
                      })
  
                  } else {
                      print("Error : \(response.data)")
                  }
  
                  if response.error != nil {
                      print(response.error!)
                      self.showAlert("One or more photos could not be downloaded. Please try again.")
                      completion({
                          throw response.error!
                      })
                  }
          }
  </code></pre>
  
  <p>I'm getting a 403 Error:</p>
  
  <pre><code>Error : Optional(409 bytes)
  responseValidationFailed(Alamofire.AFError.ResponseValidationFailureReason.unacceptableStatusCode(403))
  </code></pre>
  
  <p>I'm pretty sure there is an encoding problem with reserved characters in the URL posted above but couldn't yet figure out how to properly tell AlamoFire on how to encode it. Any clues are highly appreciated. Thank you for your help. </p>