package com.example.ayudapy.api import okhttp3.OkHttpClient import okhttp3.logging.HttpLoggingInterceptor import retrofit2.Retrofit import retrofit2.converter.gson.GsonConverterFactory interface ApiPedidos { companion object{ val instance: ApiService by lazy{ val builder_pedido = Retrofit.Builder() .baseUrl("https://ayudapy.org/api/v1/helprequestsgeo/") .addConverterFactory(GsonConverterFactory.create()) val client = OkHttpClient.Builder() client.addInterceptor(HttpLoggingInterceptor().apply { level = HttpLoggingInterceptor.Level.BODY }) builder_pedido.client(client.build()) builder_pedido.build().create(ApiService::class.java) } } }