Skip to content

Commit 6dcc5f6

Browse files
Merge pull request #11 from contentstack/development
# [Config]: Added support for Region in Config class.
2 parents f8caa7b + d7bfaf8 commit 6dcc5f6

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.contentstack.sdk</groupId>
88
<artifactId>java</artifactId>
9-
<version>1.4.2-SNAPSHOT</version>
9+
<version>1.4.2</version>
1010
<packaging>jar</packaging>
1111

1212
<name>contentstack-java</name>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public class Config {
3232
protected String environment = null;
3333
protected ContentstackRegion region = ContentstackRegion.US;
3434

35-
public enum ContentstackRegion { US, EUROPE }
35+
public enum ContentstackRegion { US, EU }
3636

3737
public ContentstackRegion getRegion() { return this.region; }
3838

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import com.contentstack.sdk.utility.CSAppConstants;
44
import com.contentstack.sdk.utility.CSController;
5-
import org.apache.log4j.BasicConfigurator;
65
import org.apache.log4j.Level;
76
import org.apache.log4j.LogManager;
87
import org.apache.log4j.Logger;
@@ -106,7 +105,7 @@ protected void setConfig(Config config){
106105
if(URL.equalsIgnoreCase("cdn.contentstack.io")) {
107106
URL = "cdn.contentstack.com";
108107
}
109-
URL = "eu-"+URL;
108+
URL = region+"-"+URL;
110109
}
111110
}
112111

0 commit comments

Comments
 (0)