16 lines
465 B
C#
16 lines
465 B
C#
using SimpleHttpServer.Types;
|
|
|
|
namespace SimpleHttpServer;
|
|
|
|
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
|
|
public class HttpEndpointAttribute : Attribute {
|
|
|
|
public HttpRequestType RequestMethod { get; private set; }
|
|
public string[] Locations { get; private set; }
|
|
|
|
public HttpEndpointAttribute(HttpRequestType requestMethod, params string[] locations) {
|
|
RequestMethod = requestMethod;
|
|
Locations = locations;
|
|
}
|
|
}
|