File tree Expand file tree Collapse file tree 3 files changed +4
-3
lines changed
src/main/java/com/contentstack/sdk Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 55import org .json .JSONArray ;
66import org .json .JSONException ;
77import org .json .JSONObject ;
8- import retrofit2 .Call ;
9- import retrofit2 .Callback ;
108import retrofit2 .Response ;
119import 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 ();
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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" ;
You can’t perform that action at this time.
0 commit comments