title: Return HTTP request data
body: <p>I would like to return the var points from my method getAllPoints()</p>
  <pre class="lang-swift prettyprint-override"><code>struct tempPoint: Decodable {
      let idPoint:Int
      let ptName:String
      let ptLat:Double
      let ptLong:Double
  }
  
  func getAllPoints(){
  
  if let url = URL(string: &quot;[MyWebService.com]&quot;) {
          URLSession.shared.dataTask(with: url) { data, response, error in
              if let data = data {
                  if let jsonString = String(data: data, encoding: .utf8) {
                      let jsonData = Data(jsonString.utf8)
                      do {
                          let points = try JSONDecoder().decode([tempPoint].self, from: jsonData)
                      } catch let error {
                          print(error)
                      }
                      print(jsonString)
                  }
              }
          }.resume()
      }
  }
  </code></pre>
  <p>Results that I got when I do print(points)</p>
  <pre class="lang-json prettyprint-override"><code>[
  {&quot;idPoint&quot;:6,&quot;ptName&quot;:&quot;Maison&quot;,&quot;ptLat&quot;:43.72623997050257,&quot;ptLong&quot;:2.202591651830584},
  {&quot;idPoint&quot;:7,&quot;ptName&quot;:&quot;Wheelin&quot;,&quot;ptLat&quot;:42.75754326128173,&quot;ptLong&quot;:8.137330631668685},
  {&quot;idPoint&quot;:8,&quot;ptName&quot;:&quot;Animoz&quot;,&quot;ptLat&quot;:45.76321863196126,&quot;ptLong&quot;:7.137186047202841},
  {&quot;idPoint&quot;:9,&quot;ptName&quot;:&quot;Hesias&quot;,&quot;ptLat&quot;:45.767222865412144,&quot;ptLong&quot;:6.132352002277385},
  {&quot;idPoint&quot;:10,&quot;ptName&quot;:&quot;Marcombes&quot;,&quot;ptLat&quot;:45.76018235160473,&quot;ptLong&quot;:4.085466264251463},
  {&quot;idPoint&quot;:11,&quot;ptName&quot;:&quot;Leclan&quot;,&quot;ptLat&quot;:48.80950120948317,&quot;ptLong&quot;:2.110623123039061},
  {&quot;idPoint&quot;:12,&quot;ptName&quot;:&quot;Cournon Skatepark&quot;,&quot;ptLat&quot;:39.74138613175866,&quot;ptLong&quot;:4.2154977334348906}
  ]
  </code></pre>
  <p>I wonder if this is possible to return these at the end of my method.
  I'm gonna use it in a pickerView and to do a CRUD that's why I would like to store them.</p>
  <p>Thank You</p>