Skip to content

Commit 020f080

Browse files
committed
Merge pull request #44 from intercom/dehora/ua
Add a user-agent string to the default headers
2 parents 8b75a2f + 7b16671 commit 020f080

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Intercom/IntercomAbstractClient.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ abstract class IntercomAbstractClient extends Client
1717
/** @var string */
1818
const DEFAULT_ACCEPT_HEADER = 'application/vnd.intercom.3+json';
1919

20+
const USER_AGENT = 'intercom-php/1.0.0-b1';
21+
22+
2023
/**
2124
* Configures the client by setting the appropriate headers, service description and error handling
2225
*
@@ -96,7 +99,8 @@ public static function getDefaultConfig()
9699
'service_description' => __DIR__ . '/Service/config/intercom.json',
97100
'headers' => [
98101
'Content-Type' => self::DEFAULT_CONTENT_TYPE,
99-
'Accept' => self::DEFAULT_ACCEPT_HEADER
102+
'Accept' => self::DEFAULT_ACCEPT_HEADER,
103+
'User-Agent' => self::USER_AGENT
100104
]
101105
];
102106
}

0 commit comments

Comments
 (0)