@@ -115,21 +115,6 @@ interface FossIdRestService {
115115 }
116116 }
117117
118- /* *
119- * An interceptor to set the timeout of the requests based on the call headers. If no timeout header is present,
120- * default timeout of the client is used.
121- */
122- object TimeoutInterceptor : Interceptor {
123- override fun intercept (chain : Interceptor .Chain ): okhttp3.Response {
124- val request = chain.request()
125- val newReadTimeout = request.header(READ_TIMEOUT_HEADER )
126-
127- val readTimeout = newReadTimeout?.toIntOrNull() ? : chain.readTimeoutMillis()
128-
129- return chain.withReadTimeout(readTimeout, TimeUnit .MILLISECONDS ).proceed(request)
130- }
131- }
132-
133118 @POST(" api.php" )
134119 suspend fun getProject (@Body body : PostRequestBody ): PolymorphicDataResponseBody <Project >
135120
@@ -238,3 +223,18 @@ interface FossIdRestService {
238223 @GET(" index.php?form=login" )
239224 suspend fun getLoginPage (): ResponseBody
240225}
226+
227+ /* *
228+ * An interceptor to set the timeout of the requests based on the call headers. If no timeout header is present,
229+ * default timeout of the client is used.
230+ */
231+ private object TimeoutInterceptor : Interceptor {
232+ override fun intercept (chain : Interceptor .Chain ): okhttp3.Response {
233+ val request = chain.request()
234+ val newReadTimeout = request.header(READ_TIMEOUT_HEADER )
235+
236+ val readTimeout = newReadTimeout?.toIntOrNull() ? : chain.readTimeoutMillis()
237+
238+ return chain.withReadTimeout(readTimeout, TimeUnit .MILLISECONDS ).proceed(request)
239+ }
240+ }
0 commit comments