UriJsonSource.HeaderParameters Property
Specifies the header parameters that the UriJsonSource includes into the JSON data request.
Namespace: DevExpress.DataAccess.Json
Assembly: DevExpress.DataAccess.v19.1.dll
Declaration
Property Value
Type | Description |
---|---|
HeaderParameterCollection | Lists header parameters. |
Remarks
Example:
public static JsonDataSource CreateReportDataSourceWithAuthenticationInCode() {
// Create a new UriJsonSource object and configure authentication data in it
var jsonSource = new DevExpress.DataAccess.Json.UriJsonSource();
jsonSource.Uri = new Uri(@"http://northwind.servicestack.net/customers.json");
jsonSource.HeaderParameters.Add(new HeaderParameter("MyAuthHeader1", "secretToken1"));
jsonSource.HeaderParameters.Add(new HeaderParameter("MyAuthHeader2", "secretToken2"));
// Create JsonDataSource
var jsonDataSource = new DevExpress.DataAccess.Json.JsonDataSource() {
JsonSource = jsonSource
};
jsonDataSource.Fill();
}
See Also