Unosquare
    Show / Hide Table of Contents

    Class UrlEncodedDataParser

    Parses URL queries or URL-encoded HTML forms.

    Inheritance
    Object
    UrlEncodedDataParser
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: EmbedIO.Utilities
    Syntax
    public static class UrlEncodedDataParser

    Methods

    Parse(String, Boolean, Boolean)

    Parses a URL query or URL-encoded HTML form.

    Unlike , the returned will have bracketed indexes stripped away; for example, a[0]=1&a[1]=2 will yield the same result as a=1&a=2, i.e. a with one key (a) associated with two values (1 and 2).

    Declaration
    public static NameValueCollection Parse(string source, bool groupFlags, bool mutableResult = true)
    Parameters
    Type Name Description
    String source

    The string to parse.

    Boolean groupFlags

    If this parameter is true, tokens not followed by an equal sign (e.g. this in a=1&this&b=2) will be grouped as values of a null key. This is the same behavior as the QueryString and properties.

    If this parameter is false, tokens not followed by an equal sign (e.g. this in a=1&this&b=2) will be considered keys with an empty value. This is the same behavior as the GetRequestQueryData(IHttpContext) extension method.

    Boolean mutableResult

    true (the default) to return a mutable (non-read-only) collection; false to return a read-only collection.

    Returns
    Type Description
    NameValueCollection

    A containing the parsed data.

    Comments

    Back to top Copyright © 2017-2019 Unosquare