예제 #1
0
        public Task <JObject> GetValueAsync([PathVariable] int id, [RequestParam] string test)
        {
            FeignClientMethodInfo feignClientMethodInfo = new FeignClientMethodInfo();

            feignClientMethodInfo.MethodId = "GetById";
            if (IncludeMethodMetadata)
            {
                feignClientMethodInfo.MethodMetadata = typeof(FeignClientMethodInfo).GetMethod("");
            }
            FeignClientHttpRequest request = new FeignClientHttpRequest("", "", "", "", "");

            throw new NotImplementedException();
        }
        public FeignClientHttpRequest(string baseUrl, string mappingUri, string uri, string httpMethod, string contentType, string accept, string[] headers, FeignClientHttpRequestContent requestContent, FeignClientMethodInfo method)
        {
            BaseUrl        = baseUrl;
            MappingUri     = mappingUri;
            Uri            = uri;
            HttpMethod     = httpMethod;
            RequestContent = requestContent;
            Method         = method;
            Accept         = accept;
            Headers        = headers;
            if (string.IsNullOrWhiteSpace(contentType))
            {
                contentType = "application/json; charset=utf-8";
            }
            MediaTypeHeaderValue mediaTypeHeaderValue;

            if (!MediaTypeHeaderValue.TryParse(contentType, out mediaTypeHeaderValue))
            {
                throw new ArgumentException("ContentType error");
            }
            MediaType   = mediaTypeHeaderValue.MediaType;
            ContentType = mediaTypeHeaderValue;
        }