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 ResultCallBackgetCallBackObject()StringgetController()HashMap<String,Object>getFormParams()LinkedHashMapgetHeaders()StringgetInfo()CSAppConstants.RequestMethodgetRequestMethod()org.json.JSONObjectgetResponse()booleangetTreatDuplicateKeysAsArrayItems()voidsend()voidsetCallBackObject(ResultCallBack callBackObject)voidsetController(String controller)voidsetFormParams(HashMap<String,Object> formParams)StringsetFormParamsGET(HashMap<String,Object> params)voidsetFormParamsPOST(org.json.JSONObject requestJSON)voidsetHeaders(LinkedHashMap headers)voidsetInfo(String info)voidsetRequestMethod(CSAppConstants.RequestMethod requestMethod)voidsetTreatDuplicateKeysAsArrayItems(boolean treatDuplicateKeysAsArrayItems)
-
-
-
Constructor Detail
-
CSHttpConnection
public CSHttpConnection(String urlToCall, IRequestModelHTTP csConnectionRequest)
-
-
Method Detail
-
setController
public void setController(String controller)
- Specified by:
setControllerin interfaceIURLRequestHTTP
-
getController
public String getController()
- Specified by:
getControllerin interfaceIURLRequestHTTP
-
setHeaders
public void setHeaders(LinkedHashMap headers)
- Specified by:
setHeadersin interfaceIURLRequestHTTP
-
getHeaders
public LinkedHashMap getHeaders()
- Specified by:
getHeadersin interfaceIURLRequestHTTP
-
setInfo
public void setInfo(String info)
- Specified by:
setInfoin interfaceIURLRequestHTTP
-
getInfo
public String getInfo()
- Specified by:
getInfoin interfaceIURLRequestHTTP
-
setFormParamsPOST
public void setFormParamsPOST(org.json.JSONObject requestJSON)
-
setCallBackObject
public void setCallBackObject(ResultCallBack callBackObject)
- Specified by:
setCallBackObjectin interfaceIURLRequestHTTP
-
getCallBackObject
public ResultCallBack getCallBackObject()
- Specified by:
getCallBackObjectin interfaceIURLRequestHTTP
-
setTreatDuplicateKeysAsArrayItems
public void setTreatDuplicateKeysAsArrayItems(boolean treatDuplicateKeysAsArrayItems)
- Specified by:
setTreatDuplicateKeysAsArrayItemsin interfaceIURLRequestHTTP
-
getTreatDuplicateKeysAsArrayItems
public boolean getTreatDuplicateKeysAsArrayItems()
- Specified by:
getTreatDuplicateKeysAsArrayItemsin interfaceIURLRequestHTTP
-
setRequestMethod
public void setRequestMethod(CSAppConstants.RequestMethod requestMethod)
- Specified by:
setRequestMethodin interfaceIURLRequestHTTP
-
getRequestMethod
public CSAppConstants.RequestMethod getRequestMethod()
- Specified by:
getRequestMethodin interfaceIURLRequestHTTP
-
getResponse
public org.json.JSONObject getResponse()
- Specified by:
getResponsein interfaceIURLRequestHTTP
-
send
public void send()
- Specified by:
sendin interfaceIURLRequestHTTP
-
-