/*
 * Copyright © Yan Zhenjie. All Rights Reserved
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.yanzhenjie.nohttp.rest;

import com.yanzhenjie.nohttp.NoHttp;

/**
 * <p>
 * Synchronization handle executor.
 * </p>
 * Created by Yan Zhenjie on 2016/10/12.
 */
public enum SyncRequestExecutor {

    INSTANCE;

    private RequestHandler mRequestHandler;

    SyncRequestExecutor() {
        mRequestHandler = new RequestHandler(NoHttp.getInitializeConfig().getCacheStore(), NoHttp.getInitializeConfig().getNetworkExecutor());
    }

    /**
     * Perform a handle.
     */
    public <T> Response<T> execute(Request<T> request) {
        return mRequestHandler.handle(request);
    }
}

@@ -644,16 +644,67 @@
 .rest;%0A%0A
+import com.yanzhenjie.nohttp.InitializationConfig;%0A
 import c
@@ -732,16 +732,16 @@
 NoHttp;%0A
-
 %0A/**%0A * 
@@ -952,24 +952,106 @@
 xecutor() %7B%0A
+        InitializationConfig initializationConfig = NoHttp.getInitializeConfig();%0A
         mReq
@@ -1083,35 +1083,42 @@
 Handler(
-NoHttp.getI
+%0A                i
 nitializ
 eConfig(
@@ -1105,33 +1105,35 @@
    initializ
-e
+ation
 Config
-()
 .getCacheSto
@@ -1137,36 +1137,42 @@
 Store(),
- NoHttp.getI
+%0A                i
 nitializ
 eConfig(
@@ -1163,25 +1163,27 @@
 nitializ
-e
+ation
 Config
-()
 .getNetw
@@ -1195,16 +1195,80 @@
 ecutor()
+,%0A                initializationConfig.getInterceptor()%0A        
 );%0A    %7D

Add interceptor.