igo/app/src/main/java/com/igo/ucpr/igo/Networking/Servicio.java
/**
     * crea el servicio retrofit para la comunicacion
     *
     * @param serviceClass objeto interface

     * @return retrofit service
     */
crea el servicio retrofit para la comunicacion
@param serviceClass objeto interface

@return retrofit service
crea el servicio retrofit para la comunicacion @param serviceClass objeto interface @return retrofit service
public static <S> S createService(Class<S> serviceClass) {
        httpClient.addInterceptor(new Interceptor() {
            @Override
            public Response intercept(Interceptor.Chain chain) throws IOException {
                Request original = chain.request();
                Request.Builder requestBuilder = original.newBuilder()
                        .method(original.method(), original.body());
                Request request = requestBuilder.build();
                return chain.proceed(request);
            }
        });
        httpClient.addInterceptor(logging);
        OkHttpClient client = httpClient.build();
        Retrofit retrofit = builder.client(client).build();
        return retrofit.create(serviceClass);
    }
public static < S > S createService ( Class < S > serviceClass ) { httpClient . addInterceptor ( new Interceptor ( ) { @ Override public Response intercept ( Interceptor . Chain chain ) throws IOException { Request original = chain . request ( ) ; Request . Builder requestBuilder = original . newBuilder ( ) . method ( original . method ( ) , original . body ( ) ) ; Request request = requestBuilder . build ( ) ; return chain . proceed ( request ) ; } } ) ; httpClient . addInterceptor ( logging ) ; OkHttpClient client = httpClient . build ( ) ; Retrofit retrofit = builder . client ( client ) . build ( ) ; return retrofit . create ( serviceClass ) ; }
crea el servicio retrofit para la comunicacion
 @param serviceClass objeto interface
crea el servicio retrofit para la comunicacion @param serviceClass objeto interface