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<String,Object> headers)voidsetInfo(String info)voidsetRequestMethod(CSAppConstants.RequestMethod requestMethod)voidsetTreatDuplicateKeysAsArrayItems(boolean treatDuplicateKeysAsArrayItems)
-
Constructor Details
-
Method Details
-
getFormParams
-
setFormParams
-
setController
- Specified by:
setControllerin interfaceIURLRequestHTTP
-
getController
- Specified by:
getControllerin interfaceIURLRequestHTTP
-
setHeaders
- Specified by:
setHeadersin interfaceIURLRequestHTTP
-
getHeaders
- Specified by:
getHeadersin interfaceIURLRequestHTTP
-
setInfo
- Specified by:
setInfoin interfaceIURLRequestHTTP
-
getInfo
- Specified by:
getInfoin interfaceIURLRequestHTTP
-
setFormParamsPOST
public void setFormParamsPOST(org.json.JSONObject requestJSON) -
setCallBackObject
- Specified by:
setCallBackObjectin interfaceIURLRequestHTTP
-
getCallBackObject
- Specified by:
getCallBackObjectin interfaceIURLRequestHTTP
-
setTreatDuplicateKeysAsArrayItems
public void setTreatDuplicateKeysAsArrayItems(boolean treatDuplicateKeysAsArrayItems)- Specified by:
setTreatDuplicateKeysAsArrayItemsin interfaceIURLRequestHTTP
-
getTreatDuplicateKeysAsArrayItems
public boolean getTreatDuplicateKeysAsArrayItems()- Specified by:
getTreatDuplicateKeysAsArrayItemsin interfaceIURLRequestHTTP
-
setRequestMethod
- Specified by:
setRequestMethodin interfaceIURLRequestHTTP
-
getRequestMethod
- Specified by:
getRequestMethodin interfaceIURLRequestHTTP
-
getResponse
public org.json.JSONObject getResponse()- Specified by:
getResponsein interfaceIURLRequestHTTP
-
setFormParamsGET
-
send
public void send()- Specified by:
sendin interfaceIURLRequestHTTP
-