GET Request

client – Server

Understanding New Concepts

GET request: An HTTP request where a client requests a specified resource from a server.
HTTP method: Another term for the type of HTTP request.
URL: Specifies a location for retrieving data over the network.
Status code: A number returned in response to an HTTP request that indicates the results of the request.
Client: The role that an iPhone play if it is accessing data from the network(ex. downloading images from Facebook)

1
2
3
4
5
6
7
8
9
10
11
12
13
import UIKit
 
class ViewController: UIViewController {
    @IBOutlet weak var imageView: UIImageView!
 
    override func viewDidLoad(){
        super.viewDidLoad()
 
 
        NSURLSession.sharedSession()
    }
}