예제 #1
0
        //localPath should be provided only for post and put cmds
        //serverPostAct should be provided only for post cmd
        private void SubmitRequest(Uri request, string method)
        {
            //Submit request if http2 was chosen
            Http2Logger.LogConsole("Submitting request");

            var headers = new HeadersList
            {
                new KeyValuePair <string, string>(CommonHeaders.Method, method.ToLower()),
                new KeyValuePair <string, string>(CommonHeaders.Path, request.PathAndQuery.ToLower()),
                new KeyValuePair <string, string>(CommonHeaders.Authority, _host.ToLower()),
                new KeyValuePair <string, string>(CommonHeaders.Scheme, _scheme.ToLower()),
            };

            Http2Logger.LogHeaders(headers);

            //Sending request with default  priority
            _sessionAdapter.SendRequest(headers, Constants.DefaultStreamPriority, true);
            Http2Logger.LogConsole("Request sent");
        }