Catch HTTP/Traffic request/response in Appium


I am using Appium cli 1.11.1
node 11.12.0
npm 6.9.0
Java Client 7.0.0

Is there any option to catch the http traffic to appium / to my java code ?
And then to filter in the code any part that needed, I am aware that the android device
should define proxy in the wifi settings and then in the pc it can be seen (fiddler for example)
but I want to catch it not in the pc but in the code (Appium/Java)

code sample will be fantastic,

Thanks !

Are you talking about Entire device traffic?

I am talking about http / https traffic
Not logcat…