Skip to content

Commit

Permalink
Used getEndpoint function (Azure#18701)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbeauregardb authored Jan 20, 2021
1 parent c0ca148 commit 2bbfec5
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.azure.core.credential.AccessToken;
import com.azure.core.credential.TokenCredential;
import com.azure.core.credential.TokenRequestContext;
import com.azure.communication.common.ConnectionString;
import com.azure.communication.sms.models.SendSmsResponse;
import com.azure.core.http.rest.Response;
import com.azure.core.http.HttpClient;
Expand Down Expand Up @@ -54,7 +55,7 @@ protected SmsClientBuilder getSmsClientBuilder(HttpClient httpClient) {

protected SmsClientBuilder getSmsClientBuilderWithManagedIdentity(HttpClient httpClient) {
SmsClientBuilder builder = new SmsClientBuilder();
String livetestEndpoint = CONNECTION_STRING.split("=")[1].split(";")[0];
String livetestEndpoint = new ConnectionString(CONNECTION_STRING).getEndpoint();

builder.endpoint(livetestEndpoint)
.httpClient(httpClient == null ? interceptorManager.getPlaybackClient() : httpClient);
Expand Down

0 comments on commit 2bbfec5

Please sign in to comment.