<PackageReference Include="Refit" Version="16.1.0" />

Refit.QueryAttribute

public sealed class QueryAttribute : Attribute
Controls query or form names, value formats and collection formats. The delimiter joins nested property names (default: '.').
public CollectionFormat CollectionFormat { get; set; }

Gets or sets how the collection should be encoded.

public string Delimiter { get; }

Gets the value used to customize the name of either the query parameter pair or of the form field when form encoding.

public string Format { get; set; }

Gets or sets the value used to customize the formatting of the encoded value.

public bool IsCollectionFormatSpecified { get; }

Gets a value indicating whether this instance is collection format specified.

public string Prefix { get; }

Gets the value used to customize the name of the encoded value.

public bool SerializeNull { get; set; }

Gets or sets a value indicating whether a null property value should still be serialized (as an empty value, e.g. key=) instead of being omitted. By default null properties are skipped; set this to true on a property whose null must be sent.

public bool TreatAsString { get; set; }

Gets or sets a value indicating whether the value should be treated as a string. Set to true if you want to call ToString() on the object before adding it to the query string.

public QueryAttribute()

Initializes a new instance of the QueryAttribute class.

public QueryAttribute(string delimiter)

Initializes a new instance of the QueryAttribute class.

public QueryAttribute(string delimiter, string prefix)

Initializes a new instance of the QueryAttribute class.

public QueryAttribute(string delimiter, string prefix, string format)

Initializes a new instance of the QueryAttribute class.

public QueryAttribute(CollectionFormat collectionFormat)

Initializes a new instance of the QueryAttribute class.