Skip to content

Instantly share code, notes, and snippets.

@jstart
Last active August 15, 2016 18:48
Show Gist options
  • Save jstart/f8c466dc2ddc81118893d733fa13628f to your computer and use it in GitHub Desktop.
Save jstart/f8c466dc2ddc81118893d733fa13628f to your computer and use it in GitHub Desktop.
import Alamofire
protocol Request {
var path : String { get }
var method : Method { get }
func parameters() -> [String : AnyObject]
}
struct AuthRequest : Request {
let path = "auth"
let method = Method.POST
var password : String
var password_verify : String
var name : String
var email : String
func parameters() -> [String : AnyObject] {
return ["password" : password, "password_verify" : password_verify, "name" : name, "email" : email]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment