UriJsonSource.QueryParameters Property
Provides access to a collection of parameters that the UriJsonSource passes to a JSON endpoint as HTTP request parameters.
Namespace: DevExpress.DataAccess.Json
Assembly: DevExpress.DataAccess.v24.2.dll
Declaration
Property Value
Type | Description |
---|---|
QueryParameterCollection | Lists query parameters. |
Remarks
This property stores a collection of query parameters that the UriJsonSource appends to a JSON endpoint’s Uri.
The parameters are added to endpoint requests in the same order in which they are stored in the collection. Change the order of elements in the collection to reposition parameters in endpoint requests.
Example
public static JsonDataSource CreateDataSourceWithAuthenticationInCode() {
// Create a new UriJsonSource object and configure authentication data in it
var jsonSource = new DevExpress.DataAccess.Json.UriJsonSource();
jsonSource.Uri = new Uri(@"https://northwind.netcore.io/customers.json");
jsonSource.QueryParameters.Add(new QueryParameter("id", "123456"));
jsonSource.QueryParameters.Add(new QueryParameter("name", "MyName"));
// Create JsonDataSource
var jsonDataSource = new DevExpress.DataAccess.Json.JsonDataSource() {
JsonSource = jsonSource
};
jsonDataSource.Fill();
}
See Also