public class Config extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
environment |
protected String |
URL |
protected String |
URLSCHEMA |
protected String |
VERSION |
| Constructor and Description |
|---|
Config()
BuiltConfig constructor
Example : BuiltConfig config = new BuiltConfig(); |
| Modifier and Type | Method and Description |
|---|---|
String |
getEnvironment()
Get environment.
|
String |
getHost()
Get URL.
|
String |
getVersion()
Get version of the Built.io Contentstack server.
|
boolean |
isSSL()
Get URL.
|
protected void |
setEnvironment(String environment)
set environment.
|
void |
setHost(String hostName)
Sets host name of the Built.io Contentstack server.
|
void |
setSSL(boolean isSSL)
Sets the protocol in base url.
|
protected String URLSCHEMA
protected String URL
protected String VERSION
protected String environment
public Config()
BuiltConfig config = new BuiltConfig();
public void setHost(String hostName)
hostName - host name.
Note: Default hostname sets to cdn.contentstack.io
and default protocol is HTTPS.
Example :
config.setHost("cdn.contentstack.io");
public void setSSL(boolean isSSL)
isSSL - true/false values initiating calls (HTTPS/HTTP) respectively.
Note: Default protocol is HTTPS.
Example :
config.setSSL(true);
public String getHost()
String url = config.getHost();
public boolean isSSL()
boolean protocol = config.isSSL();
public String getVersion()
String version = config.getVersion();
protected void setEnvironment(String environment)
environment - environment uid/name
config.setEnvironment("stag", false);
public String getEnvironment()
String environment = config.getEnvironment();
Copyright © 2019 Contentstack. All rights reserved.