11package com .contentstack .sdk ;
22
33import okhttp3 .ResponseBody ;
4- import org .jetbrains .annotations .NotNull ;
54import org .json .JSONArray ;
65import org .json .JSONException ;
76import org .json .JSONObject ;
87import retrofit2 .Response ;
9- import retrofit2 .Retrofit ;
108
119import java .io .IOException ;
1210import java .io .UnsupportedEncodingException ;
@@ -29,7 +27,6 @@ public class CSHttpConnection implements IURLRequestHTTP {
2927 private LinkedHashMap <String , Object > headers ;
3028 private String info ;
3129 private APIService service ;
32- private String endpoint ;
3330 private ResultCallBack callBackObject ;
3431 private JSONObject responseJSON ;
3532 private HashMap <String , Object > formParams ;
@@ -183,8 +180,6 @@ public void send() {
183180 }
184181
185182 private void getService (String requestUrl ) throws IOException {
186- // Retrofit retrofit = new Retrofit.Builder().baseUrl(this.endpoint).build();
187- // APIService service = retrofit.create(APIService.class);
188183 this .headers .put (X_USER_AGENT , CLIENT_USER_AGENT );
189184 this .headers .put (CONTENT_TYPE , APPLICATION_JSON );
190185 Response <ResponseBody > response = this .service .getRequest (requestUrl , this .headers ).execute ();
@@ -210,10 +205,6 @@ void setError(String errResp) {
210205 connectionRequest .onRequestFailed (responseJSON , errCode , callBackObject );
211206 }
212207
213- protected void setEndpoint (@ NotNull String endpoint ) {
214- this .endpoint = endpoint ;
215- }
216-
217208 public void setAPIService (APIService service ) {
218209 this .service = service ;
219210 }
0 commit comments