Skip to content

dave-r12/okhttp-byte-counter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OkHttp Byte Counter

Count the bytes written and read by an OkHttpClient.

Android

The TLS implementation on Android does not allow this to work out of the box. Once this change is merged, it should hopefully work on Android: google/conscrypt#65

Usage

ByteCounter byteCounter = new ByteCounter();
OkHttpClient client = new OkHttpClient.Builder()
    .socketFactory(byteCounter.socketFactory())
    .build();

// Make requests...

System.out.println(byteCounter.bytesWritten());
System.out.println(byteCounter.bytesRead());

About

Count the bytes written and read by an OkHttpClient.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages