Skip to main content

UriJsonSource.HeaderParameters Property

Provides access to a collection of parameters that the UriJsonSource includes in requests to a JSON endpoint as custom HTTP headers.

Namespace: DevExpress.DataAccess.Json

Assembly: DevExpress.DataAccess.v22.2.dll

NuGet Package: DevExpress.DataAccess


public HeaderParameterCollection HeaderParameters { get; }

Property Value

Type Description

Lists header parameters.


This property stores a collection of header parameters that the UriJsonSource uses to add custom HTTP headers to JSON endpoint requests.

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.


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(@"");

    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
See Also