mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
Add javadocs
This commit is contained in:
parent
c7000b7565
commit
dac91fe8cc
1 changed files with 11 additions and 0 deletions
|
|
@ -16,6 +16,9 @@ import timber.log.Timber;
|
|||
|
||||
public class NetworkInterceptors {
|
||||
|
||||
/**
|
||||
* Interceptor to log the HTTP request
|
||||
*/
|
||||
@NonNull
|
||||
public static HttpRequestInterceptor getHttpRequestInterceptor() {
|
||||
return (HttpRequest request, HttpContext httpContext) -> {
|
||||
|
|
@ -30,6 +33,10 @@ public class NetworkInterceptors {
|
|||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Log all request params from a HTTPRequest
|
||||
* @param request
|
||||
*/
|
||||
private static void logRequestParams(HttpRequest request) {
|
||||
Set<String> names = new HashSet<>();
|
||||
if (request.getParams() instanceof ClientParamsStack) {
|
||||
|
|
@ -62,6 +69,10 @@ public class NetworkInterceptors {
|
|||
Timber.v("<<<<<<<<<<<<<< REQUEST PARAMS >>>>>>>>>>>>");
|
||||
}
|
||||
|
||||
/**
|
||||
* Log all headers from a HTTPRequest
|
||||
* @param request
|
||||
*/
|
||||
private static void logRequestHeaders(HttpRequest request) {
|
||||
Header[] headerFields = request.getAllHeaders();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue