chansen / p5-http-tiny

Tiny HTTP Client
https://metacpan.org/dist/HTTP-Tiny
53 stars 52 forks source link

Hook for logging request? #124

Open jrubinator opened 5 years ago

jrubinator commented 5 years ago

I have a use case for logging some information about the request (what headers were actually sent). Does adding a hook/callback just before $handle->write_request($request); sound reasonable? If so, I can submit a patch for that.

jrubinator commented 5 years ago

@xdg - do you have any opinion on this?

xdg commented 5 years ago

Hi. I'm not actively doing Perl development on this module, so I have to abstain, as I wouldn't be responsible for reviewing or merging.

jrubinator commented 5 years ago

Ah, is @chansen the correct person to ask now?

jrubinator commented 5 years ago

@chansen any thoughts?

karenetheridge commented 5 years ago

This isn't a vote one way or another, but just an observation -- adding hooks would make this module less tiny. LWP::UserAgent already supports hooks, so you might find your usecase better served there.

xdg commented 3 years ago

Another possibility could be intercepting the data written to the output handle, which would be a way to address debugging needs like #123.