Tusker/Pachyderm/Request/Method.swift

31 lines
538 B
Swift
Raw Normal View History

2018-09-11 14:52:21 +00:00
//
// Method.swift
// Pachyderm
//
// Created by Shadowfacts on 9/8/18.
// Copyright © 2018 Shadowfacts. All rights reserved.
//
import Foundation
public enum Method {
2018-09-11 14:52:21 +00:00
case get, post, put, patch, delete
}
extension Method {
public var name: String {
2018-09-11 14:52:21 +00:00
switch self {
case .get:
return "GET"
case .post:
return "POST"
case .put:
return "PUT"
case .patch:
return "PATCH"
case .delete:
return "DELETE"
}
}
}