Flurl
Describes how to handle null values in query parameters.
Set as name without value in query string.
Don't add to query string, remove any existing value.
Don't add to query string, but leave any existing value unchanged.
Represents a URL query as a key-value dictionary. Insertion order is preserved.
Returns serialized, encoded query string. Insertion order is preserved.
Returns serialized, encoded query string. Insertion order is preserved.
Adds a new query parameter.
Adds a new query parameter, allowing you to specify whether the value is already encoded.
True if the collection contains a query parameter with the given name.
Removes all parameters of the given name.
The number of parameters that were removed
is null.
Replaces an existing QueryParameter or appends one to the end. If object is a collection type (array, IEnumerable, etc.),
multiple parameters are added, i.e. x=1&x=2. If any of the same name already exist, they are overwritten one by one
(preserving order) and any remaining are appended to the end. If fewer values are specified than already exist,
remaining existing values are removed.
Gets or sets a query parameter value by name. A query may contain multiple values of the same name
(i.e. "x=1&x=2"), in which case the value is an array, which works for both getting and setting.
The query parameter name
The query parameter value or array of values
Represents an individual name/value pair within a URL query.
Creates a new instance of a query parameter. Allows specifying whether string value provided has
already been URL-encoded.
The name (left side) of the query parameter.
The value (right side) of the query parameter.
Returns the string ("name=value") representation of the query parameter.
Indicates whether to encode space characters with "+" instead of "%20".
A set of string extension methods for working with Flurl URLs
Creates a new Url object from the string and appends a segment to the URL path,
ensuring there is one and only one '/' character as a separator.
The URL.
The segment to append
If true, URL-encodes reserved characters such as '/', '+', and '%'. Otherwise, only encodes strictly illegal characters (including '%' but only when not followed by 2 hex characters).
the resulting Url object
Appends multiple segments to the URL path, ensuring there is one and only one '/' character as a seperator.
The URL.
The segments to append
the Url object with the segments appended
Appends multiple segments to the URL path, ensuring there is one and only one '/' character as a seperator.
The URL.
The segments to append
the Url object with the segments appended
Creates a new Url object from the string and adds a parameter to the query, overwriting the value if name exists.
The URL.
Name of query parameter
Value of query parameter
Indicates how to handle null values. Defaults to Remove (any existing)
The Url object with the query parameter added
Creates a new Url object from the string and adds a parameter to the query, overwriting the value if name exists.
The URL.
Name of query parameter
Value of query parameter
Set to true to indicate the value is already URL-encoded. Defaults to false.
Indicates how to handle null values. Defaults to Remove (any existing).
The Url object with the query parameter added
Creates a new Url object from the string and adds a parameter without a value to the query, removing any existing value.
The URL.
Name of query parameter
The Url object with the query parameter added
Creates a new Url object from the string, parses values object into name/value pairs, and adds them to the query,
overwriting any that already exist.
The URL.
Typically an anonymous object, ie: new { x = 1, y = 2 }
Indicates how to handle null values. Defaults to Remove (any existing)
The Url object with the query parameters added
Creates a new Url object from the string and adds multiple parameters without values to the query.
The URL.
Names of query parameters.
The Url object with the query parameter added
Creates a new Url object from the string and adds multiple parameters without values to the query.
The URL.
Names of query parameters
The Url object with the query parameter added.
Creates a new Url object from the string and removes a name/value pair from the query by name.
The URL.
Query string parameter name to remove
The Url object with the query parameter removed
Creates a new Url object from the string and removes multiple name/value pairs from the query by name.
The URL.
Query string parameter names to remove
The Url object with the query parameters removed
Creates a new Url object from the string and removes multiple name/value pairs from the query by name.
The URL.
Query string parameter names to remove
The Url object with the query parameters removed
Set the URL fragment fluently.
The URL.
The part of the URL afer #
The Url object with the new fragment set
Removes the URL fragment including the #.
The Url object with the fragment removed
Trims the URL to its root, including the scheme, any user info, host, and port (if specified).
A Url object.
A mutable object for fluently building URLs.
The full absolute path part of the URL (everything except the query and fragment).
The query part of the URL (after the ?, RFC 3986).
The fragment part of the URL (after the #, RFC 3986).
Query parsed to name/value pairs.
Constructs a Url object from a string.
The URL to use as a starting point (required)
is .
Constructs a Url object from a System.Uri.
The System.Uri (required)
is .
Parses a URL query to a QueryParamCollection dictionary.
The URL query to parse.
Basically a Path.Combine for URLs. Ensures exactly one '/' seperates each segment,
and exactly on '&' seperates each query parameter.
URL-encodes illegal characters but not reserved characters.
URL parts to combine.
Returns the root URL of the given full URL, including the scheme, any user info, host, and port (if specified).
Decodes a URL-encoded string.
The URL-encoded string.
If true, any '+' character will be decoded to a space.
URL-encodes a string, including reserved characters such as '/' and '?'.
The string to encode.
If true, spaces will be encoded as + signs. Otherwise, they'll be encoded as %20.
The encoded URL.
URL-encodes characters in a string that are neither reserved nor unreserved. Avoids encoding reserved characters such as '/' and '?'. Avoids encoding '%' if it begins a %-hex-hex sequence (i.e. avoids double-encoding).
The string to encode.
If true, spaces will be encoded as + signs. Otherwise, they'll be encoded as %20.
The encoded URL.
Appends a segment to the URL path, ensuring there is one and only one '/' character as a seperator.
The segment to append
If true, URL-encodes reserved characters such as '/', '+', and '%'. Otherwise, only encodes strictly illegal characters (including '%' but only when not followed by 2 hex characters).
the Url object with the segment appended
is .
Appends multiple segments to the URL path, ensuring there is one and only one '/' character as a seperator.
The segments to append
the Url object with the segments appended
Appends multiple segments to the URL path, ensuring there is one and only one '/' character as a seperator.
The segments to append
the Url object with the segments appended
Adds a parameter to the query, overwriting the value if name exists.
Name of query parameter
Value of query parameter
Indicates how to handle null values. Defaults to Remove (any existing)
The Url object with the query parameter added
Adds a parameter to the query, overwriting the value if name exists.
Name of query parameter
Value of query parameter
Set to true to indicate the value is already URL-encoded
Indicates how to handle null values. Defaults to Remove (any existing)
The Url object with the query parameter added
is .
Adds a parameter without a value to the query, removing any existing value.
Name of query parameter
The Url object with the query parameter added
Parses values (usually an anonymous object or dictionary) into name/value pairs and adds them to the query, overwriting any that already exist.
Typically an anonymous object, ie: new { x = 1, y = 2 }
Indicates how to handle null values. Defaults to Remove (any existing)
The Url object with the query parameters added
Adds multiple parameters without values to the query.
Names of query parameters.
The Url object with the query parameter added
Adds multiple parameters without values to the query.
Names of query parameters
The Url object with the query parameter added.
Removes a name/value pair from the query by name.
Query string parameter name to remove
The Url object with the query parameter removed
Removes multiple name/value pairs from the query by name.
Query string parameter names to remove
The Url object with the query parameters removed
Removes multiple name/value pairs from the query by name.
Query string parameter names to remove
The Url object with the query parameters removed
Set the URL fragment fluently.
The part of the URL afer #
The Url object with the new fragment set
Removes the URL fragment including the #.
The Url object with the fragment removed
Checks if this URL is a well-formed.
true if this is a well-formed URL
Checks if a string is a well-formed URL.
The string to check
true if s is a well-formed URL
Resets the URL to its root, including the scheme, any user info, host, and port (if specified).
The Url object trimmed to its root.
Converts this Url object to its string representation.
Creates a copy of this Url.
Converts this Url object to its string representation.
Indicates whether to encode spaces with the "+" character instead of "%20"
Converts this Url object to System.Uri
The System.Uri object
Implicit conversion from Url to String.
The Url object
The string
Implicit conversion from String to Url.
The String representation of the URL
The string
Implicit conversion from System.Uri to Flurl.Url.
The string
True if obj is an instance of Url and its string representation is equal to this instance's string representation.
The object to compare to this instance.
Returns the hashcode for this Url.
CommonExtensions for objects.
Returns a key-value-pairs representation of the object.
For strings, URL query string format assumed and pairs are parsed from that.
For objects that already implement IEnumerable<KeyValuePair>, the object itself is simply returned.
For all other objects, all publicly readable properties are extracted and returned as pairs.
The object to parse into key-value pairs
is .
Returns a string that represents the current object, using CultureInfo.InvariantCulture where possible.
Dates are represented in IS0 8601.
Splits at the first occurence of the given separator.
The string to split.
The separator to split on.
Array of at most 2 strings. (1 if separator is not found.)
Merges the key/value pairs from d2 into d1, without overwriting those already set in d1.
Strips any single quotes or double quotes from the beginning and end of a string.