예제 #1
0
 public QueryItem[] GetQueryItem(Api.Resources.Method method, ParameterInfo parameter)
 {
     return(new QueryItem()
     {
         key = queryKey,
         value = queryValue,
     }.AsArray());
 }
예제 #2
0
 public Header GetHeader(Api.Resources.Method method, ParameterInfo parameter)
 {
     return(new Header()
     {
         key = headerKey,
         value = headerValue,
         type = "text",
     });
 }
예제 #3
0
 public QueryItem[] GetQueryItems(Api.Resources.Method method)
 {
     return(new QueryItem()
     {
         key = queryKey,
         value = queryValue,
     }
            .AsArray());
 }
 public Url GetUrl(Api.Resources.Method method, QueryItem[] queryItems)
 {
     return(new Url()
     {
         raw = $"{Url.VariableHostName}/{method.Route.Namespace}/{method.Route.Name}/{this.Action}",
         host = Url.VariableHostName.AsArray(),
         path = new string[] { method.Route.Namespace, method.Route.Name, this.Action },
         query = queryItems,
     });
 }
        public Header GetHeader(Api.Resources.Method method, ParameterInfo parameter)
        {
            if (!method.MethodPoco.TryGetAttributeInterface(out IValidateHttpRequest requestValidator))
            {
                return new Header()
                       {
                           key   = "{{AuthorizationHeaderName}}",
                           value = "{{TOKEN}}",
                           type  = "text",
                       }
            }
            ;

            return(new Header()
            {
                key = $"api-voucher",
                value = "{{ApiVoucher}}",
                type = "text",
            });
        }
    }