System.Net.Http.HttpRequestMessage.HttpRequestMessage C# (CSharp) Method

HttpRequestMessage() private method

private HttpRequestMessage ( HttpMethod method, string requestUri ) : System.Diagnostics.CodeAnalysis
method HttpMethod
requestUri string
return System.Diagnostics.CodeAnalysis
        public HttpRequestMessage(HttpMethod method, string requestUri)
        {
            if (NetEventSource.IsEnabled) NetEventSource.Enter(this, method, requestUri);

            // It's OK to have a 'null' request Uri. If HttpClient is used, the 'BaseAddress' will be added.
            // If there is no 'BaseAddress', sending this request message will throw.
            // Note that we also allow the string to be empty: null and empty are considered equivalent.
            if (string.IsNullOrEmpty(requestUri))
            {
                InitializeValues(method, null);
            }
            else
            {
                InitializeValues(method, new Uri(requestUri, UriKind.RelativeOrAbsolute));
            }

            if (NetEventSource.IsEnabled) NetEventSource.Exit(this);
        }

Same methods

HttpRequestMessage::HttpRequestMessage ( ) : System.Diagnostics.CodeAnalysis
HttpRequestMessage::HttpRequestMessage ( HttpMethod method, Uri requestUri ) : System.Diagnostics.CodeAnalysis