Lowery Jill's repositories
CRUD-Restful-Client-with-OkHttp
package com.gpcoder.service; import java.io.IOException; import okhttp3.FormBody; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.RequestBody; import okhttp3.Response; /** * This is a first step in restful flow. We must authorize first and use the token for other request. */ public class AuthenticationClient {
Interceptor-with-OkHttp
package com.gpcoder.interceptor; import java.io.IOException; import com.gpcoder.service.AuthenticationClient; import okhttp3.Interceptor; import okhttp3.Request; import okhttp3.Response; public class AuthInterceptor implements Interceptor {
OkHttpClientExample.java
package com.gpcoder; import java.io.IOException; import com.gpcoder.service.AuthenticationClient; import okhttp3.HttpUrl; import okhttp3.MediaType; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.RequestBody; import okhttp3.Response; public class OkHttpClientExample {
valeriephamm
Config files for my GitHub profile.