Skip to content

Commit

Permalink
Merge pull request #1295 from ashitsalesforce/master
Browse files Browse the repository at this point in the history
set client name in every server request
  • Loading branch information
ashitsalesforce authored Sep 30, 2024
2 parents ab6fe97 + 0b34f3b commit 08c88bd
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,12 @@ private void setAuthAndClientHeadersForHttpMethod() {
Config config = Config.getCurrentConfig();
this.httpMethod.addHeader("client_id", config.getString(Config.OAUTH_CLIENTID));
}
Header clientNameHeaderVal = this.httpMethod.getFirstHeader(ClientBase.SFORCE_CALL_OPTIONS_HEADER);
if (clientNameHeaderVal == null) {
this.httpMethod.addHeader(ClientBase.SFORCE_CALL_OPTIONS_HEADER,
"client=" + ClientBase.getClientName(Config.getCurrentConfig()));

}
}
public static void closeConnections() {
if (currentHttpClient != null) {
Expand Down

0 comments on commit 08c88bd

Please sign in to comment.