@@ -150,6 +150,13 @@ public bool GetEnvironments(SuccessCallback<GetEnvironmentsResponse> successCall
150
150
req . SuccessCallback = successCallback ;
151
151
req . FailCallback = failCallback ;
152
152
req . CustomData = customData == null ? new Dictionary < string , object > ( ) : customData ;
153
+ if ( req . CustomData . ContainsKey ( Constants . String . CUSTOM_REQUEST_HEADERS ) )
154
+ {
155
+ foreach ( KeyValuePair < string , string > kvp in req . CustomData [ Constants . String . CUSTOM_REQUEST_HEADERS ] as Dictionary < string , string > )
156
+ {
157
+ req . Headers . Add ( kvp . Key , kvp . Value ) ;
158
+ }
159
+ }
153
160
req . Parameters [ "version" ] = VersionDate ;
154
161
req . OnResponse = OnGetEnvironmentsResponse ;
155
162
@@ -264,6 +271,13 @@ public bool AddEnvironment(SuccessCallback<Environment> successCallback, FailCal
264
271
req . SuccessCallback = successCallback ;
265
272
req . FailCallback = failCallback ;
266
273
req . CustomData = customData == null ? new Dictionary < string , object > ( ) : customData ;
274
+ if ( req . CustomData . ContainsKey ( Constants . String . CUSTOM_REQUEST_HEADERS ) )
275
+ {
276
+ foreach ( KeyValuePair < string , string > kvp in req . CustomData [ Constants . String . CUSTOM_REQUEST_HEADERS ] as Dictionary < string , string > )
277
+ {
278
+ req . Headers . Add ( kvp . Key , kvp . Value ) ;
279
+ }
280
+ }
267
281
req . Parameters [ "version" ] = VersionDate ;
268
282
req . OnResponse = OnAddEnvironmentResponse ;
269
283
req . Headers [ "Content-Type" ] = "application/json" ;
@@ -357,6 +371,13 @@ public bool GetEnvironment(SuccessCallback<Environment> successCallback, FailCal
357
371
req . SuccessCallback = successCallback ;
358
372
req . FailCallback = failCallback ;
359
373
req . CustomData = customData == null ? new Dictionary < string , object > ( ) : customData ;
374
+ if ( req . CustomData . ContainsKey ( Constants . String . CUSTOM_REQUEST_HEADERS ) )
375
+ {
376
+ foreach ( KeyValuePair < string , string > kvp in req . CustomData [ Constants . String . CUSTOM_REQUEST_HEADERS ] as Dictionary < string , string > )
377
+ {
378
+ req . Headers . Add ( kvp . Key , kvp . Value ) ;
379
+ }
380
+ }
360
381
req . Parameters [ "version" ] = VersionDate ;
361
382
req . OnResponse = OnGetEnvironmentResponse ;
362
383
@@ -446,6 +467,13 @@ public bool DeleteEnvironment(SuccessCallback<DeleteEnvironmentResponse> success
446
467
req . SuccessCallback = successCallback ;
447
468
req . FailCallback = failCallback ;
448
469
req . CustomData = customData == null ? new Dictionary < string , object > ( ) : customData ;
470
+ if ( req . CustomData . ContainsKey ( Constants . String . CUSTOM_REQUEST_HEADERS ) )
471
+ {
472
+ foreach ( KeyValuePair < string , string > kvp in req . CustomData [ Constants . String . CUSTOM_REQUEST_HEADERS ] as Dictionary < string , string > )
473
+ {
474
+ req . Headers . Add ( kvp . Key , kvp . Value ) ;
475
+ }
476
+ }
449
477
req . Parameters [ "version" ] = VersionDate ;
450
478
req . OnResponse = OnDeleteEnvironmentResponse ;
451
479
req . Delete = true ;
@@ -537,6 +565,13 @@ private void OnDeleteEnvironmentResponse(RESTConnector.Request req, RESTConnecto
537
565
req . SuccessCallback = successCallback ;
538
566
req . FailCallback = failCallback ;
539
567
req . CustomData = customData == null ? new Dictionary < string , object > ( ) : customData ;
568
+ if ( req . CustomData . ContainsKey ( Constants . String . CUSTOM_REQUEST_HEADERS ) )
569
+ {
570
+ foreach ( KeyValuePair < string , string > kvp in req . CustomData [ Constants . String . CUSTOM_REQUEST_HEADERS ] as Dictionary < string , string > )
571
+ {
572
+ req . Headers . Add ( kvp . Key , kvp . Value ) ;
573
+ }
574
+ }
540
575
req . Parameters [ "version" ] = VersionDate ;
541
576
if ( ! string . IsNullOrEmpty ( name ) )
542
577
{
@@ -667,6 +702,13 @@ public bool AddConfiguration(SuccessCallback<Configuration> successCallback, Fai
667
702
req . SuccessCallback = successCallback ;
668
703
req . FailCallback = failCallback ;
669
704
req . CustomData = customData == null ? new Dictionary < string , object > ( ) : customData ;
705
+ if ( req . CustomData . ContainsKey ( Constants . String . CUSTOM_REQUEST_HEADERS ) )
706
+ {
707
+ foreach ( KeyValuePair < string , string > kvp in req . CustomData [ Constants . String . CUSTOM_REQUEST_HEADERS ] as Dictionary < string , string > )
708
+ {
709
+ req . Headers . Add ( kvp . Key , kvp . Value ) ;
710
+ }
711
+ }
670
712
req . Parameters [ "version" ] = VersionDate ;
671
713
req . OnResponse = OnAddConfigurationResponse ;
672
714
req . Headers [ "Content-Type" ] = "application/json" ;
@@ -762,6 +804,13 @@ public bool GetConfiguration(SuccessCallback<Configuration> successCallback, Fai
762
804
req . SuccessCallback = successCallback ;
763
805
req . FailCallback = failCallback ;
764
806
req . CustomData = customData == null ? new Dictionary < string , object > ( ) : customData ;
807
+ if ( req . CustomData . ContainsKey ( Constants . String . CUSTOM_REQUEST_HEADERS ) )
808
+ {
809
+ foreach ( KeyValuePair < string , string > kvp in req . CustomData [ Constants . String . CUSTOM_REQUEST_HEADERS ] as Dictionary < string , string > )
810
+ {
811
+ req . Headers . Add ( kvp . Key , kvp . Value ) ;
812
+ }
813
+ }
765
814
req . Parameters [ "version" ] = VersionDate ;
766
815
req . OnResponse = OnGetConfigurationResponse ;
767
816
@@ -854,6 +903,13 @@ public bool DeleteConfiguration(SuccessCallback<DeleteConfigurationResponse> suc
854
903
req . SuccessCallback = successCallback ;
855
904
req . FailCallback = failCallback ;
856
905
req . CustomData = customData == null ? new Dictionary < string , object > ( ) : customData ;
906
+ if ( req . CustomData . ContainsKey ( Constants . String . CUSTOM_REQUEST_HEADERS ) )
907
+ {
908
+ foreach ( KeyValuePair < string , string > kvp in req . CustomData [ Constants . String . CUSTOM_REQUEST_HEADERS ] as Dictionary < string , string > )
909
+ {
910
+ req . Headers . Add ( kvp . Key , kvp . Value ) ;
911
+ }
912
+ }
857
913
req . Parameters [ "version" ] = VersionDate ;
858
914
req . OnResponse = OnDeleteConfigurationResponse ;
859
915
req . Delete = true ;
@@ -1015,6 +1071,13 @@ private void OnDeleteConfigurationResponse(RESTConnector.Request req, RESTConnec
1015
1071
req . SuccessCallback = successCallback ;
1016
1072
req . FailCallback = failCallback ;
1017
1073
req . CustomData = customData == null ? new Dictionary < string , object > ( ) : customData ;
1074
+ if ( req . CustomData . ContainsKey ( Constants . String . CUSTOM_REQUEST_HEADERS ) )
1075
+ {
1076
+ foreach ( KeyValuePair < string , string > kvp in req . CustomData [ Constants . String . CUSTOM_REQUEST_HEADERS ] as Dictionary < string , string > )
1077
+ {
1078
+ req . Headers . Add ( kvp . Key , kvp . Value ) ;
1079
+ }
1080
+ }
1018
1081
req . Parameters [ "version" ] = VersionDate ;
1019
1082
req . OnResponse = OnPreviewConfigurationResponse ;
1020
1083
@@ -1130,6 +1193,13 @@ private void OnPreviewConfigurationResponse(RESTConnector.Request req, RESTConne
1130
1193
req . SuccessCallback = successCallback ;
1131
1194
req . FailCallback = failCallback ;
1132
1195
req . CustomData = customData == null ? new Dictionary < string , object > ( ) : customData ;
1196
+ if ( req . CustomData . ContainsKey ( Constants . String . CUSTOM_REQUEST_HEADERS ) )
1197
+ {
1198
+ foreach ( KeyValuePair < string , string > kvp in req . CustomData [ Constants . String . CUSTOM_REQUEST_HEADERS ] as Dictionary < string , string > )
1199
+ {
1200
+ req . Headers . Add ( kvp . Key , kvp . Value ) ;
1201
+ }
1202
+ }
1133
1203
req . Parameters [ "version" ] = VersionDate ;
1134
1204
if ( ! string . IsNullOrEmpty ( name ) )
1135
1205
{
@@ -1256,6 +1326,13 @@ public bool AddCollection(SuccessCallback<CollectionRef> successCallback, FailCa
1256
1326
req . SuccessCallback = successCallback ;
1257
1327
req . FailCallback = failCallback ;
1258
1328
req . CustomData = customData == null ? new Dictionary < string , object > ( ) : customData ;
1329
+ if ( req . CustomData . ContainsKey ( Constants . String . CUSTOM_REQUEST_HEADERS ) )
1330
+ {
1331
+ foreach ( KeyValuePair < string , string > kvp in req . CustomData [ Constants . String . CUSTOM_REQUEST_HEADERS ] as Dictionary < string , string > )
1332
+ {
1333
+ req . Headers . Add ( kvp . Key , kvp . Value ) ;
1334
+ }
1335
+ }
1259
1336
req . Parameters [ "version" ] = VersionDate ;
1260
1337
req . OnResponse = OnAddCollectionResponse ;
1261
1338
req . Headers [ "Content-Type" ] = "application/json" ;
@@ -1351,6 +1428,13 @@ public bool GetCollection(SuccessCallback<Collection> successCallback, FailCallb
1351
1428
req . SuccessCallback = successCallback ;
1352
1429
req . FailCallback = failCallback ;
1353
1430
req . CustomData = customData == null ? new Dictionary < string , object > ( ) : customData ;
1431
+ if ( req . CustomData . ContainsKey ( Constants . String . CUSTOM_REQUEST_HEADERS ) )
1432
+ {
1433
+ foreach ( KeyValuePair < string , string > kvp in req . CustomData [ Constants . String . CUSTOM_REQUEST_HEADERS ] as Dictionary < string , string > )
1434
+ {
1435
+ req . Headers . Add ( kvp . Key , kvp . Value ) ;
1436
+ }
1437
+ }
1354
1438
req . Parameters [ "version" ] = VersionDate ;
1355
1439
req . OnResponse = OnGetCollectionResponse ;
1356
1440
@@ -1443,6 +1527,13 @@ public bool DeleteCollection(SuccessCallback<DeleteCollectionResponse> successCa
1443
1527
req . SuccessCallback = successCallback ;
1444
1528
req . FailCallback = failCallback ;
1445
1529
req . CustomData = customData == null ? new Dictionary < string , object > ( ) : customData ;
1530
+ if ( req . CustomData . ContainsKey ( Constants . String . CUSTOM_REQUEST_HEADERS ) )
1531
+ {
1532
+ foreach ( KeyValuePair < string , string > kvp in req . CustomData [ Constants . String . CUSTOM_REQUEST_HEADERS ] as Dictionary < string , string > )
1533
+ {
1534
+ req . Headers . Add ( kvp . Key , kvp . Value ) ;
1535
+ }
1536
+ }
1446
1537
req . Parameters [ "version" ] = VersionDate ;
1447
1538
req . OnResponse = OnDeleteCollectionResponse ;
1448
1539
req . Delete = true ;
@@ -1536,6 +1627,13 @@ public bool GetFields(SuccessCallback<GetFieldsResponse> successCallback, FailCa
1536
1627
req . SuccessCallback = successCallback ;
1537
1628
req . FailCallback = failCallback ;
1538
1629
req . CustomData = customData == null ? new Dictionary < string , object > ( ) : customData ;
1630
+ if ( req . CustomData . ContainsKey ( Constants . String . CUSTOM_REQUEST_HEADERS ) )
1631
+ {
1632
+ foreach ( KeyValuePair < string , string > kvp in req . CustomData [ Constants . String . CUSTOM_REQUEST_HEADERS ] as Dictionary < string , string > )
1633
+ {
1634
+ req . Headers . Add ( kvp . Key , kvp . Value ) ;
1635
+ }
1636
+ }
1539
1637
req . Parameters [ "version" ] = VersionDate ;
1540
1638
req . OnResponse = OnGetFieldsResponse ;
1541
1639
@@ -1801,6 +1899,13 @@ private void OnGetFieldsResponse(RESTConnector.Request req, RESTConnector.Respon
1801
1899
req . SuccessCallback = successCallback ;
1802
1900
req . FailCallback = failCallback ;
1803
1901
req . CustomData = customData == null ? new Dictionary < string , object > ( ) : customData ;
1902
+ if ( req . CustomData . ContainsKey ( Constants . String . CUSTOM_REQUEST_HEADERS ) )
1903
+ {
1904
+ foreach ( KeyValuePair < string , string > kvp in req . CustomData [ Constants . String . CUSTOM_REQUEST_HEADERS ] as Dictionary < string , string > )
1905
+ {
1906
+ req . Headers . Add ( kvp . Key , kvp . Value ) ;
1907
+ }
1908
+ }
1804
1909
req . Parameters [ "version" ] = VersionDate ;
1805
1910
req . OnResponse = OnAddDocumentResponse ;
1806
1911
@@ -1908,6 +2013,13 @@ public bool DeleteDocument(SuccessCallback<DeleteDocumentResponse> successCallba
1908
2013
req . SuccessCallback = successCallback ;
1909
2014
req . FailCallback = failCallback ;
1910
2015
req . CustomData = customData == null ? new Dictionary < string , object > ( ) : customData ;
2016
+ if ( req . CustomData . ContainsKey ( Constants . String . CUSTOM_REQUEST_HEADERS ) )
2017
+ {
2018
+ foreach ( KeyValuePair < string , string > kvp in req . CustomData [ Constants . String . CUSTOM_REQUEST_HEADERS ] as Dictionary < string , string > )
2019
+ {
2020
+ req . Headers . Add ( kvp . Key , kvp . Value ) ;
2021
+ }
2022
+ }
1911
2023
req . Parameters [ "version" ] = VersionDate ;
1912
2024
req . OnResponse = OnDeleteDocumentResponse ;
1913
2025
req . Delete = true ;
@@ -2004,6 +2116,13 @@ public bool GetDocument(SuccessCallback<DocumentStatus> successCallback, FailCal
2004
2116
req . SuccessCallback = successCallback ;
2005
2117
req . FailCallback = failCallback ;
2006
2118
req . CustomData = customData == null ? new Dictionary < string , object > ( ) : customData ;
2119
+ if ( req . CustomData . ContainsKey ( Constants . String . CUSTOM_REQUEST_HEADERS ) )
2120
+ {
2121
+ foreach ( KeyValuePair < string , string > kvp in req . CustomData [ Constants . String . CUSTOM_REQUEST_HEADERS ] as Dictionary < string , string > )
2122
+ {
2123
+ req . Headers . Add ( kvp . Key , kvp . Value ) ;
2124
+ }
2125
+ }
2007
2126
req . Parameters [ "version" ] = VersionDate ;
2008
2127
req . OnResponse = OnGetDocumentResponse ;
2009
2128
@@ -2263,6 +2382,13 @@ private void OnGetDocumentResponse(RESTConnector.Request req, RESTConnector.Resp
2263
2382
req . SuccessCallback = successCallback ;
2264
2383
req . FailCallback = failCallback ;
2265
2384
req . CustomData = customData == null ? new Dictionary < string , object > ( ) : customData ;
2385
+ if ( req . CustomData . ContainsKey ( Constants . String . CUSTOM_REQUEST_HEADERS ) )
2386
+ {
2387
+ foreach ( KeyValuePair < string , string > kvp in req . CustomData [ Constants . String . CUSTOM_REQUEST_HEADERS ] as Dictionary < string , string > )
2388
+ {
2389
+ req . Headers . Add ( kvp . Key , kvp . Value ) ;
2390
+ }
2391
+ }
2266
2392
req . Parameters [ "version" ] = VersionDate ;
2267
2393
req . OnResponse = OnUpdateDocumentResponse ;
2268
2394
@@ -2382,6 +2508,13 @@ public bool Query(SuccessCallback<QueryResponse> successCallback, FailCallback f
2382
2508
req . SuccessCallback = successCallback ;
2383
2509
req . FailCallback = failCallback ;
2384
2510
req . CustomData = customData == null ? new Dictionary < string , object > ( ) : customData ;
2511
+ if ( req . CustomData . ContainsKey ( Constants . String . CUSTOM_REQUEST_HEADERS ) )
2512
+ {
2513
+ foreach ( KeyValuePair < string , string > kvp in req . CustomData [ Constants . String . CUSTOM_REQUEST_HEADERS ] as Dictionary < string , string > )
2514
+ {
2515
+ req . Headers . Add ( kvp . Key , kvp . Value ) ;
2516
+ }
2517
+ }
2385
2518
2386
2519
if ( ! string . IsNullOrEmpty ( filter ) )
2387
2520
req . Parameters [ "filter" ] = filter ;
0 commit comments