We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eea5d0a commit 5c11c85Copy full SHA for 5c11c85
lib/common.ts
@@ -3,7 +3,12 @@ import os = require('os');
3
// tslint:disable-next-line:no-var-requires
4
const pkg = require('../package.json');
5
6
-export function getSdkHeaders(serviceName: string, serviceVersion: string, operationId: string): any {
+export type SdkHeaders = {
7
+ 'User-Agent': string;
8
+ 'X-IBMCloud-SDK-Analytics': string;
9
+}
10
+
11
+export function getSdkHeaders(serviceName: string, serviceVersion: string, operationId: string): SdkHeaders | {} {
12
// disable analytics headers in the browser - they cause cors issues
13
const isBrowser = typeof window !== 'undefined';
14
if (isBrowser) {
0 commit comments