Added HttpRequest.HttpMethod, Deprecated HttpRequest.Method
ln.build - build0.waldrennach.l--n.de build job pending Details

master
Harald Wolff 2020-12-07 09:30:01 +01:00
parent 3e38b1381a
commit df08265edf
3 changed files with 13 additions and 3 deletions

View File

@ -0,0 +1,8 @@
namespace ln.http
{
public enum HttpMethod {
HEAD, GET, POST, PUT, PATCH, DELETE, CONNECT, OPTIONS, TRACE
}
}

View File

@ -30,7 +30,9 @@ namespace ln.http
public Uri BaseURI { get; set; }
public Uri URI { get; private set; }
public String Method { get; private set; }
[Obsolete]
public String Method { get => HttpMethod.ToString(); private set => throw new NotImplementedException(); }
public HttpMethod HttpMethod { get; private set; }
public String RequestURL { get; private set; }
public String Protocol { get; private set; }
@ -105,7 +107,7 @@ namespace ln.http
if (requestTokens.Length != 3)
throw new BadRequestException();
Method = requestTokens[0];
HttpMethod = (HttpMethod)Enum.Parse(typeof(HttpMethod), requestTokens[0]);
RequestURL = requestTokens[1];
Protocol = requestTokens[2];
}

View File

@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>0.2.3</Version>
<Version>0.2.4-test</Version>
<Authors>Harald Wolff-Thobaben</Authors>
<Company>l--n.de</Company>
<Description />