Skip to content

Array HTTP Query

fonlow edited this page Apr 14, 2020 · 2 revisions

Support for array in HTTP query is available in WebApiClientGenCore only.

The following forms of array in HTTP query are supported:

  • IEnumerable<T>
  • IList<T>
  • ICollection<T>
  • IQueryable<T>
  • IReadOnlyList<T>
  • List<T>
  • Collection<T>
  • IReadOnlyCollection<T>
  • IAsyncEnumerable<T>
  • ObservableCollection<T>
  • T[]

T could be primitive types and enum types. However, for T[], T could be only Int32, Int64, Decimal, Double, Single, String, UInt32, UInt64, Int16 and UInt16. Therefore, when declaring array as HTTP query with FromQueryAttribute, it is better just use IEnumerable<> or similar generic list types.

Clone this wiki locally