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

Implement Request/Response.ToString() and use print functions #71

Open
SchlenkR opened this issue Sep 28, 2021 · 0 comments
Open

Implement Request/Response.ToString() and use print functions #71

SchlenkR opened this issue Sep 28, 2021 · 0 comments

Comments

@SchlenkR
Copy link
Owner

SchlenkR commented Sep 28, 2021

print functions for the FsHttp representation of Request and Response records are currently implemented in Print.fs, which export Request.print () and Response.print (). Those functions are only used when FsHttp is used in FSI (see FsiInit.fs).

It would be nice (e.g. for debugging purpose or in non-FSI environments) having a ToString() overload per-default in Response and Request that output similar information as when using print(). Since the print function implementation is long, it should not "pollute" the definition of Request and Response (which are defined in Domain.fs) and stay separated from definitions in Domain.fs.

What could be a good way of bringing together

  • Print functions reside in a separate module
  • ToString implementation for Response and Request generalls using the ones in Print module
  • Slightly different ToString / print implementations for non-FSI and FSI, which is: In non-FSI environments, any ToString() implementation should not cause side effects (e.g. like reading from Request/Response streams).

?

@CaptnCodr CaptnCodr self-assigned this May 27, 2023
@CaptnCodr CaptnCodr removed their assignment Dec 6, 2023
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

No branches or pull requests

2 participants