Skip to content

Commit 56699f2

Browse files
committed
refactor(discovery): correct opt out header
1 parent d11da58 commit 56699f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Scripts/Services/Discovery/v1/Discovery.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2553,8 +2553,8 @@ public bool Query(SuccessCallback<QueryResponse> successCallback, FailCallback f
25532553
if (!string.IsNullOrEmpty(_return))
25542554
req.Parameters["return"] = _return;
25552555

2556-
if (!string.IsNullOrEmpty(loggingOptOut)
2557-
restRequest.WithHeader("X-Watson-Logging-Opt-Out", loggingOptOut);
2556+
if (loggingOptOut != null)
2557+
req.Headers.Add("X-Watson-Logging-Opt-Out", loggingOptOut.ToString());
25582558

25592559
req.Parameters["offset"] = offset;
25602560
req.Parameters["count"] = count;

0 commit comments

Comments
 (0)