kean / Pulse

Network logger for Apple platforms
https://pulselogger.com
MIT License
6.25k stars 296 forks source link

Add option to display custom headers in the list view #196

Closed tahirmt closed 1 year ago

tahirmt commented 1 year ago

Adding an option to customize the list on iOS to be able to show any header value through the Settings page.

This is a replacement of #174

Screenshots

List view

Simulator Screenshot - iPhone 14 Pro - 2023-06-04 at 13 41 12

Settings

Simulator Screenshot - iPhone 14 Pro - 2023-06-04 at 13 41 44 Simulator Screenshot - iPhone 14 Pro - 2023-06-04 at 13 41 53

tahirmt commented 1 year ago

@kean What do you think about this implementation. It's more controlled. I would like there to be a way to add default values so that if someone wants to add some headers for their app they can start with that value instead of having to do it after launching the app.

kean commented 1 year ago

Thanks @tahirmt, this looks great!

instead of having to do it after launching the app.

Yes, there needs to be a way to configure it programmatically. I was considering making UserDefaults public in Pulse 4, so that you could do the following on the first app launch:

if isFirstAppRun {
    UserSettings.shared.displayHeaders = ["Cache-Control"]
}

I would also appreciate if you could target the pulse-4 branch instead of main. I wasn't planning to push any new 3.x releases.

tahirmt commented 1 year ago

@kean rebased to pulse-4 branch and changed the PR target. That sounds good. If you make it public that will work!

tahirmt commented 1 year ago

@kean I have a request for this to be a configurable option inside of Pulse for Mac. To be able to add headers to the list as a column or in the list view.