Skip to content

Commit 0c1aa0b

Browse files
: sparkles: azure-na : white_check_mark:
1 parent 2f93307 commit 0c1aa0b

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/main/java/com/contentstack/sdk/CSHttpConnection.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
import org.json.JSONArray;
66
import org.json.JSONException;
77
import org.json.JSONObject;
8-
import retrofit2.Call;
9-
import retrofit2.Callback;
108
import retrofit2.Response;
119
import retrofit2.Retrofit;
1210

@@ -186,6 +184,7 @@ public void send() {
186184
private void getService(String requestUrl) throws IOException {
187185
Retrofit retrofit = new Retrofit.Builder().baseUrl(this.endpoint).build();
188186
APIService service = retrofit.create(APIService.class);
187+
// [ environment deletion from header line removed for consequent calls]
189188
this.headers.put(X_USER_AGENT, CLIENT_USER_AGENT);
190189
this.headers.put(CONTENT_TYPE, APPLICATION_JSON);
191190
Response<ResponseBody> response = service.getRequest(requestUrl, this.headers).execute();

src/main/java/com/contentstack/sdk/Config.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public Config setManagementToken(@NotNull String managementToken) {
119119
}
120120

121121
/**
122-
* The enum Contentstack region.
122+
* The enum Contentstack region. for now contentstack supports US, EU and AZURE_NA
123123
*/
124124
public enum ContentstackRegion {
125125
US, EU, AZURE_NA

src/main/java/com/contentstack/sdk/Stack.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,14 @@ protected void setConfig(Config config) {
3939
String urlDomain = config.host;
4040
if (!config.region.name().isEmpty()) {
4141
String region = config.region.name().toLowerCase();
42+
// For the region EU
4243
if (region.equalsIgnoreCase("eu")) {
4344
if (urlDomain.equalsIgnoreCase("cdn.contentstack.io")) {
4445
urlDomain = "cdn.contentstack.com";
4546
}
4647
config.host = region + "-" + urlDomain;
4748
}
49+
// for the region azure_na
4850
if (region.equalsIgnoreCase("azure_na")) {
4951
if (urlDomain.equalsIgnoreCase("cdn.contentstack.io")) {
5052
urlDomain = "cdn.contentstack.com";

0 commit comments

Comments
 (0)