rukiNyc / AC3.2-URLRequest

Example on how to make GET and POST requests with URLRequest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AC3.2-URLRequest_Demo

Example on how to make GET and POST requests with URLRequest

Resources:

  1. Simple REST with Swift - grokswift
  • Scroll down a bit to see examples of URLRequest
  • I'm liking this blog more and more. Worth bookmarking.
  1. HTTP GET Request example in Swift
  • Decent article, though it makes use of Foundation types instead of Swift types.
  1. HTTP Request with POST Method - Stackoverflow
  • How to send values view HTTPBody in POST requests
  1. Completion Handlers in Swift - grokswift
  • Very nice explanation of completion handlers if you need a refresher/more detail
  • Also, the example uses JSONPlaceholder as well, so good place to get used to it
  1. Building URLs with URLComponent and URLQueryItems

References:

  1. URLRequest - Apple Doc
  2. JSONPlaceholder
  3. JSONPlaceholder Github (better docs)
  4. Updating NSURLSession to Swift 3
  • Shows you the changes to URLSession from Swift 2.0 -> 3.0

Advanced:

  1. Making a POST Request in Swift - Jameson Quave
  • Shows you how to set up a fake endpoint in Ruby as well

About

Example on how to make GET and POST requests with URLRequest

License:MIT License


Languages

Language:Swift 100.0%