Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added curl logger client aspect. #3285

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

landlockedsurfer
Copy link
Contributor

Hi all!
There was a message in the Discord the other day asking for a curl command logger.
Here's a first version that should properly handle the most basic options. It does not handle any SSL options yet though.
I used the other ZClientAspect instances as a blueprint for the implementation.
Hope this is useful!!

landlockedsurfer and others added 2 commits January 28, 2025 13:27
Co-authored-by: Jules Ivanic <jivanic@demystdata.com>
Co-authored-by: Jules Ivanic <jivanic@demystdata.com>
Copy link

@jivanic-demystdata jivanic-demystdata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Let's wait for Nabil's review :)

)(implicit trace: Trace): ZClientAspect[Nothing, Any, Nothing, Body, Nothing, Any, Nothing, Response] =
new ZClientAspect[Nothing, Any, Nothing, Body, Nothing, Any, Nothing, Response] {

def formatCurlCommand(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@landlockedsurfer Do you think we could put this capacity to transform a Request to a curl String as a method of Request and use this method here?

That'd allow people to "toString" their requests in a nice way if they need to (to log it at any moment, for example)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants