Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
I ios-tutorial
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ios-general
  • ios-tutorial
  • Wiki
  • basic networking

Last edited by Artem Kalmykov Nov 19, 2016
Page history

basic networking

Basic networking

https://www.tutorialspoint.com/http/http_requests.htm

http://www.json.org

https://github.com/Alamofire/Alamofire

tutorial.json

You should do the following:

  1. Read about HTTP requests.
  2. Read about JSON.
  3. Install Google Chrome and Postman extension.
  4. Execute GET request with http://gitlab.faifly.com/ios-general/ios-tutorial/uploads/ffffec34fa4a727922bb1e09cc24b21d/tutorial.json URL. You should see JSON with a list of organizations.
  5. Create a new branch from develop called feature/basic_networking.
  6. Create a new class called RequestManager, which is subclass of NSObject.
  7. Implement fetchOrganizations static method, which accepts one argument - a closure (block) with a single parameter - [String : AnyObject]. It should send a GET request to a URL specified above and return the response with the help of the closure.
  8. Add a new button in OrganizationInfoViewController, called “Fetch organizations”. Upon tapping that button you should call fetchOrganizations method from RequestManager, parse it into the database and present an action sheet with a list of organizations. After selecting an organization you should return to MainViewController and its table should be reloaded with appropriate organization. Request should be done with Alamofire.
  9. Create a pull request.

You should be able to answer the following questions:

  • What is an HTTP request?
  • What is JSON?
  • What data types does JSON support?
  • What is an HTTP method?
  • What HTTP methods do you know? What methods are the most common?
  • What does an HTTP request consists of?
  • What is Alamofire?
Clone repository
  • autolayout
  • basic core data
  • basic networking
  • cocoapods
  • delegation
  • gcd and math
  • git tutorial
  • Home
  • ios basics
  • notifications
  • objective c basics
  • swift
  • ui table view