Skip to main content
A newer version of this page is available. .

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

[Browsable(false)]
public HeaderParameterCollection HeaderParameters { get; }

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