Advertisement
Guest User

Untitled

a guest
May 1st, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. let request = NSMutableURLRequest(URL: (NSURL(string: "http://instudy.io:80/api/courses/my/"))!, cachePolicy: NSURLRequestCachePolicy.ReloadIgnoringLocalCacheData, timeoutInterval: 5)
  2. var response: NSURLResponse?
  3.  
  4. // create some JSON data and configure the request
  5. request.HTTPMethod = "GET"
  6. request.setValue("application/json", forHTTPHeaderField: "Content-Type")
  7. request.setValue("Token \(GlobalStorage.token)", forHTTPHeaderField: "")
  8. print("\n\nToken \(GlobalStorage.token)")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement