{"action":"opened","issue":{"url":"https://api.github.com/repos/Alamofire/Alamofire/issues/286","labels_url":"https://api.github.com/repos/Alamofire/Alamofire/issues/286/labels{/name}","comments_url":"https://api.github.com/repos/Alamofire/Alamofire/issues/286/comments","events_url":"https://api.github.com/repos/Alamofire/Alamofire/issues/286/events","html_url":"https://github.com/Alamofire/Alamofire/issues/286","id":53283300,"number":286,"title":"Mark 'Request' class with @objc","user":{"login":"aryaxt","id":3460069,"avatar_url":"https://avatars.githubusercontent.com/u/3460069?v=3","gravatar_id":"","url":"https://api.github.com/users/aryaxt","html_url":"https://github.com/aryaxt","followers_url":"https://api.github.com/users/aryaxt/followers","following_url":"https://api.github.com/users/aryaxt/following{/other_user}","gists_url":"https://api.github.com/users/aryaxt/gists{/gist_id}","starred_url":"https://api.github.com/users/aryaxt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aryaxt/subscriptions","organizations_url":"https://api.github.com/users/aryaxt/orgs","repos_url":"https://api.github.com/users/aryaxt/repos","events_url":"https://api.github.com/users/aryaxt/events{/privacy}","received_events_url":"https://api.github.com/users/aryaxt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-02T22:41:26Z","updated_at":"2015-01-02T22:41:26Z","closed_at":null,"body":"I wrote a wrapper around Alamofire to be used by my controllers written in both swift and objective c\r\n\r\nEverything works fine in both objective-c and swift,  except in certain cases I need to pass the request object to the controller, in case the controller needs to cancel the request.\r\n\r\nthe problem is since the Request class is not marked with @objc compiler won't generate the method in the header\r\n\r\n```swift\r\npublic func fetchObject <T: AnyObject>(type: T.Type, path: String, completion: (T?, NSError?)->()) -> Request {\r\n        \r\n   var request = Manager.sharedInstance.request(requestWithPath(path, method: .Get, nil: parameters))\r\n        \r\n   request.responseJSON { (request, response, json, error) in\r\n                \r\n      if let anError = error {\r\n         completion(nil, anError)\r\n      }\r\n      else {\r\n         var convertedObject = ObjectMapper.sharedInstance().objectFromSource(json, toInstanceOfClass: type) as T?\r\n         completion(convertedObject, nil)\r\n      } \r\n   }\r\n        \r\n   return request\r\n}\r\n```"}}