From 03c2a2401b920fc36240a123bbbef78e1a0902ce Mon Sep 17 00:00:00 2001 From: Cyberboss Date: Wed, 4 Apr 2018 14:53:24 -0400 Subject: [PATCH] Adds Route.Flatten --- src/Tgstation.Server.Api/Route.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Tgstation.Server.Api/Route.cs b/src/Tgstation.Server.Api/Route.cs index 9a29119de5..99789e5443 100644 --- a/src/Tgstation.Server.Api/Route.cs +++ b/src/Tgstation.Server.Api/Route.cs @@ -1,4 +1,5 @@ -using System.Net.Http; +using System; +using System.Net.Http; namespace Tgstation.Server.Api { @@ -16,5 +17,12 @@ namespace Tgstation.Server.Api /// The method of the action /// public HttpMethod Method { get; set; } + + /// + /// Adds a portion to + /// + /// The host address + /// A combined and + public Uri Flatten(Uri host) => new Uri(String.Concat(host.ToString().TrimEnd('/'), Path)); } }