Package com.contentstack.sdk
Class CSHttpConnection
- java.lang.Object
-
- com.contentstack.sdk.CSHttpConnection
-
- All Implemented Interfaces:
IURLRequestHTTP
public class CSHttpConnection extends Object implements IURLRequestHTTP
-
-
Constructor Summary
Constructors Constructor Description CSHttpConnection(String urlToCall, IRequestModelHTTP csConnectionRequest)
-
Method Summary
Modifier and Type Method Description ResultCallBack
getCallBackObject()
String
getController()
HashMap<String,Object>
getFormParams()
LinkedHashMap
getHeaders()
String
getInfo()
CSAppConstants.RequestMethod
getRequestMethod()
org.json.JSONObject
getResponse()
boolean
getTreatDuplicateKeysAsArrayItems()
void
send()
void
setCallBackObject(ResultCallBack callBackObject)
void
setController(String controller)
void
setFormParams(HashMap<String,Object> formParams)
String
setFormParamsGET(HashMap<String,Object> params)
void
setFormParamsPOST(org.json.JSONObject requestJSON)
void
setHeaders(LinkedHashMap headers)
void
setInfo(String info)
void
setRequestMethod(CSAppConstants.RequestMethod requestMethod)
void
setTreatDuplicateKeysAsArrayItems(boolean treatDuplicateKeysAsArrayItems)
-
-
-
Constructor Detail
-
CSHttpConnection
public CSHttpConnection(String urlToCall, IRequestModelHTTP csConnectionRequest)
-
-
Method Detail
-
setController
public void setController(String controller)
- Specified by:
setController
in interfaceIURLRequestHTTP
-
getController
public String getController()
- Specified by:
getController
in interfaceIURLRequestHTTP
-
setHeaders
public void setHeaders(LinkedHashMap headers)
- Specified by:
setHeaders
in interfaceIURLRequestHTTP
-
getHeaders
public LinkedHashMap getHeaders()
- Specified by:
getHeaders
in interfaceIURLRequestHTTP
-
setInfo
public void setInfo(String info)
- Specified by:
setInfo
in interfaceIURLRequestHTTP
-
getInfo
public String getInfo()
- Specified by:
getInfo
in interfaceIURLRequestHTTP
-
setFormParamsPOST
public void setFormParamsPOST(org.json.JSONObject requestJSON)
-
setCallBackObject
public void setCallBackObject(ResultCallBack callBackObject)
- Specified by:
setCallBackObject
in interfaceIURLRequestHTTP
-
getCallBackObject
public ResultCallBack getCallBackObject()
- Specified by:
getCallBackObject
in interfaceIURLRequestHTTP
-
setTreatDuplicateKeysAsArrayItems
public void setTreatDuplicateKeysAsArrayItems(boolean treatDuplicateKeysAsArrayItems)
- Specified by:
setTreatDuplicateKeysAsArrayItems
in interfaceIURLRequestHTTP
-
getTreatDuplicateKeysAsArrayItems
public boolean getTreatDuplicateKeysAsArrayItems()
- Specified by:
getTreatDuplicateKeysAsArrayItems
in interfaceIURLRequestHTTP
-
setRequestMethod
public void setRequestMethod(CSAppConstants.RequestMethod requestMethod)
- Specified by:
setRequestMethod
in interfaceIURLRequestHTTP
-
getRequestMethod
public CSAppConstants.RequestMethod getRequestMethod()
- Specified by:
getRequestMethod
in interfaceIURLRequestHTTP
-
getResponse
public org.json.JSONObject getResponse()
- Specified by:
getResponse
in interfaceIURLRequestHTTP
-
send
public void send()
- Specified by:
send
in interfaceIURLRequestHTTP
-
-