File tree Expand file tree Collapse file tree 3 files changed +6
-7
lines changed
src/main/java/com/contentstack/sdk Expand file tree Collapse file tree 3 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -184,8 +184,7 @@ public void send() {
184184 private void getService (String requestUrl ) throws IOException {
185185 Retrofit retrofit = new Retrofit .Builder ().baseUrl (this .endpoint ).build ();
186186 APIService service = retrofit .create (APIService .class );
187- // [ environment deletion from header line removed for consequent calls]
188- this .headers .put (X_USER_AGENT , CLIENT_USER_AGENT );
187+ this .headers .put (X_USER_AGENT , CLIENT_USER_AGENT );
189188 this .headers .put (CONTENT_TYPE , APPLICATION_JSON );
190189 Response <ResponseBody > response = service .getRequest (requestUrl , this .headers ).execute ();
191190 if (response .isSuccessful ()) {
Original file line number Diff line number Diff line change @@ -119,7 +119,8 @@ public Config setManagementToken(@NotNull String managementToken) {
119119 }
120120
121121 /**
122- * The enum Contentstack region. for now contentstack supports US, EU and AZURE_NA
122+ * The enum Contentstack region. for now contentstack supports
123+ * [US, EU, AZURE_NA]
123124 */
124125 public enum ContentstackRegion {
125126 US , EU , AZURE_NA
Original file line number Diff line number Diff line change @@ -37,17 +37,16 @@ protected Stack(@NotNull String apiKey) {
3737 protected void setConfig (Config config ) {
3838 this .config = config ;
3939 String urlDomain = config .host ;
40+
4041 if (!config .region .name ().isEmpty ()) {
4142 String region = config .region .name ().toLowerCase ();
42- // For the region EU
43- if (region .equalsIgnoreCase ("eu" )) {
43+ if (region .equalsIgnoreCase ("eu" )) { // For the region EU
4444 if (urlDomain .equalsIgnoreCase ("cdn.contentstack.io" )) {
4545 urlDomain = "cdn.contentstack.com" ;
4646 }
4747 config .host = region + "-" + urlDomain ;
4848 }
49- // for the region azure_na
50- if (region .equalsIgnoreCase ("azure_na" )) {
49+ if (region .equalsIgnoreCase ("azure_na" )) { // for the region azure_na
5150 if (urlDomain .equalsIgnoreCase ("cdn.contentstack.io" )) {
5251 urlDomain = "cdn.contentstack.com" ;
5352 }
You can’t perform that action at this time.
0 commit comments