forked from shadowfacts/Tusker
31 lines
524 B
Swift
31 lines
524 B
Swift
|
//
|
||
|
// Method.swift
|
||
|
// Pachyderm
|
||
|
//
|
||
|
// Created by Shadowfacts on 9/8/18.
|
||
|
// Copyright © 2018 Shadowfacts. All rights reserved.
|
||
|
//
|
||
|
|
||
|
import Foundation
|
||
|
|
||
|
enum Method {
|
||
|
case get, post, put, patch, delete
|
||
|
}
|
||
|
|
||
|
extension Method {
|
||
|
var name: String {
|
||
|
switch self {
|
||
|
case .get:
|
||
|
return "GET"
|
||
|
case .post:
|
||
|
return "POST"
|
||
|
case .put:
|
||
|
return "PUT"
|
||
|
case .patch:
|
||
|
return "PATCH"
|
||
|
case .delete:
|
||
|
return "DELETE"
|
||
|
}
|
||
|
}
|
||
|
}
|