Tusker/Packages/Pachyderm/Sources/Pachyderm/Request/Method.swift

31 lines
548 B
Swift

//
// Method.swift
// Pachyderm
//
// Created by Shadowfacts on 9/8/18.
// Copyright © 2018 Shadowfacts. All rights reserved.
//
import Foundation
public enum Method: Sendable {
case get, post, put, patch, delete
}
extension Method {
public 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"
}
}
}