fix query args
This commit is contained in:
parent
0b4975e74b
commit
6d74d659f6
|
|
@ -111,7 +111,7 @@ public sealed class HttpServer {
|
|||
var par = methodParams[i];
|
||||
var attr = par.GetCustomAttribute<ParameterAttribute>(false);
|
||||
qparams.Add((attr?.Name ?? par.Name ?? throw new ArgumentException($"C# variable name of parameter at index {i} of method {GetFancyMethodName()} is null!"),
|
||||
(par.GetType(), attr?.IsOptional ?? false)));
|
||||
(par.ParameterType, attr?.IsOptional ?? false)));
|
||||
|
||||
if (!stringToTypeParameterConverters.ContainsKey(par.ParameterType)) {
|
||||
throw new MissingParameterConverterException($"Parameter converter for type {par.ParameterType} has not been registered (yet)!");
|
||||
|
|
@ -144,7 +144,7 @@ public sealed class HttpServer {
|
|||
var path = WebUtility.UrlDecode(splitted.First());
|
||||
|
||||
|
||||
if (simpleEndpointMethodInfos.TryGetValue((decUri, ctx.Request.HttpMethod.ToUpperInvariant()), out var endpointInvocationInfo)) {
|
||||
if (simpleEndpointMethodInfos.TryGetValue((path, ctx.Request.HttpMethod.ToUpperInvariant()), out var endpointInvocationInfo)) {
|
||||
var mi = endpointInvocationInfo.methodInfo;
|
||||
var qparams = endpointInvocationInfo.queryParameters;
|
||||
var args = splitted.Length == 2 ? splitted[1] : null;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user