Exemple #1
0
 public static bool TryParse(string rawParameters, out HttpUriParameters formattedParameters)
 {
     try
     {
         formattedParameters = new HttpUriParameters(rawParameters);
         return(true);
     }
     catch
     {
         formattedParameters = null;
         return(false);
     }
 }
Exemple #2
0
        public HttpRequestLine(string requestLine)
        {
            var requestParts = requestLine.Split(' ');
            var queryParts   = requestParts[1].Split('?');

            Raw               = requestLine;
            Method            = HttpUtil.FromStringToHttpMethod(requestParts[0]);
            UriWithParameters = requestParts[1];

            Uri           = queryParts[0];
            UriParameters = queryParts.Length < 2
                ? new HttpUriParameters()
                : new HttpUriParameters(queryParts[1]);
        }