File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
src/main/java/com/contentstack/sdk Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -190,14 +190,22 @@ private void getService(String requestUrl) throws IOException {
190190 this .headers .put (USER_AGENT_KEY , USER_AGENT );
191191 this .headers .put (CONTENT_TYPE , APPLICATION_JSON );
192192
193- Request request = pluginRequestImp (requestUrl );
193+ Request request = null ;
194+ if (this .config .plugins !=null ){
195+ request = pluginRequestImp (requestUrl );
196+ //this.headers = request.headers();
197+ //requestUrl = request.url();
198+ }
194199
195200 //Call call = client.newCall(request);
196201 Response <ResponseBody > response = this .service .getRequest (requestUrl , this .headers ).execute ();
197202 if (response .isSuccessful ()) {
198203 assert response .body () != null ;
204+
199205 // TODO: On Response result
200- response = pluginResponseImp (request , response );
206+ if (request !=null ){
207+ response = pluginResponseImp ( request , response );
208+ }
201209 responseJSON = new JSONObject (response .body ().string ());
202210 if (this .config .livePreviewEntry != null && !this .config .livePreviewEntry .isEmpty ()) {
203211 handleJSONArray ();
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ public class Config {
3030 protected Proxy proxy = null ;
3131 protected ConnectionPool connectionPool = new ConnectionPool ();
3232
33- protected ArrayList <ContentstackPlugin > plugins ;
33+ protected ArrayList <ContentstackPlugin > plugins = null ;
3434
3535 public String getBranch () {
3636 return branch ;
You can’t perform that action at this time.
0 commit comments