Skip to content

Instantly share code, notes, and snippets.



Created May 2, 2016
What would you like to do?
enum EndPoints {
case GetUser
case UpdateUser(userData: User)
extension ParseEndpoints: HTTPEndPointConvertible, HTTPEndPointDSL {
func toHTTPEndPoint() -> HTTPEndPoint {
let baseURL = ""
switch (self) {
case .GetUser:
return GET("\(baseURL)/user")
case .UpdateUser(let userData):
return PUT("\(baseURL)/user") {
$0.params = userData
$0.encoding = .JSON
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.