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

Add ability for Logging (Issue #27) (2) #37

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yonojoy
Copy link
Contributor

@yonojoy yonojoy commented Apr 26, 2024

This implements the ability for logging, as described in issue #27 and discussed in pull request #29.

I recommited a pull request because I cleaned up my repository (I'm slowly starting to better understand git...) and can now provide a cleaner request that only contains one commit.

As discussed in pull request #29 this request contains code in OpenApiHttp for Delphi versions greater than XE4, that I cannot compile here (because Delphi XE4 does not provide System.Net.HttpClient and System.Net.URLClient and I am still using Delphi XE4). So please handle with care.

@yonojoy yonojoy mentioned this pull request Apr 26, 2024
@Irame
Copy link

Irame commented Apr 30, 2024

Hi, I would love to have the ability to write logs as well.

There is a minor issue with your implementation that causes it to not compile.
The call to LogRequest here does not work because SourceStream is a TStream and not a TStringStream. I would suggest to change the type of SourceStream to TStringStream to keep the encoding information.

Another feature I am missing is the ability to log the headers of the request.

Aside from that, I really like it and would love to see it merged!

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.

None yet

2 participants