section-1.swift 1.1 KB

123456789101112131415161718192021222324252627
  1. import XCPlayground
  2. import Foundation
  3. import Alamofire
  4. // Allow network requests to complete
  5. XCPSetExecutionShouldContinueIndefinitely()
  6. Alamofire.request(.GET, "http://httpbin.org/get", parameters: ["foo": "bar"])
  7. .responseString { (request, response, string, error) in
  8. println(request)
  9. println(response)
  10. println(string)
  11. }
  12. /*
  13. [BUG] In Xcode 6.0.1, execution fails with the following error:
  14. IDEPlaygroundExecution: Playground execution failed: error: Couldn't lookup symbols:
  15. __TWPSS9Alamofire20URLStringConvertible
  16. __TF9Alamofire7requestFTOS_6MethodPS_20URLStringConvertible_10parametersGSqGVSs10DictionarySSPSs9AnyObject___8encodingOS_17ParameterEncoding_CS_7Request
  17. __TFO9Alamofire6Method3GETFMS0_S0_
  18. __TIF9Alamofire7requestFTOS_6MethodPS_20URLStringConvertible_10parametersGSqGVSs10DictionarySSPSs9AnyObject___8encodingOS_17ParameterEncoding_CS_7RequestA2_
  19. __TMaC9Alamofire7Request
  20. __TFC9Alamofire7Request14responseStringfDS0_FFTCSo12NSURLRequestGSqCSo17NSHTTPURLResponse_GSqSS_GSqCSo7NSError__T_DS0_
  21. If you have a proposed fix, please send a Pull Request: https://github.com/Alamofire/Alamofire/pulls
  22. */