コード例 #1
0
        private static IDictionary <string, string> ReadRequestProperties(HttpConfiguration config, string url, HttpMethod httpMethod, string body)
        {
            var request = new HttpRequestMessage(httpMethod, url);

            request.Content = new StringContent(body);

            var routeGenerator = new Generator(config, request);

            return(routeGenerator.ReadRequestProperties(url, httpMethod));
        }
コード例 #2
0
        private static RouteValues ReadRequestProperties(HttpConfiguration config, string url, HttpMethod httpMethod, Dictionary <string, string> headers, string body, BodyFormat bodyFormat)
        {
            var request = new HttpRequestMessage(httpMethod, url);

            if (headers != null)
            {
                foreach (var header in headers)
                {
                    request.Headers.Add(header.Key, header.Value);
                }
            }
            request.Content = new StringContent(body);

            var routeGenerator = new Generator(config, request);

            return(routeGenerator.ReadRequestProperties(url, httpMethod, bodyFormat));
        }
コード例 #3
0
        private static IDictionary<string, string> ReadRequestProperties(HttpConfiguration config, string url, HttpMethod httpMethod, string body)
        {
            var request = new HttpRequestMessage(httpMethod, url);
            request.Content = new StringContent(body);

            var routeGenerator = new Generator(config, request);
            return routeGenerator.ReadRequestProperties(url, httpMethod);
        }