Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#71 0 commenti 2 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
fsharp
Ambito
api

Direzione di ricerca

Leggere Print.fs e le definizioni di Request/Response in Domain.fs, quindi esaminare FsiInit.fs per capire come vengono usati Request.print() e Response.print(). Definire la separazione desiderata tra la stampa FSI e il comportamento di ToString() privo di effetti collaterali; il lavoro è completato quando entrambi i record hanno un output ToString() predefinito, mentre la formattazione non-FSI non legge gli stream di request o response.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

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).

?

Lingua principale
F#
Stelle
498
Fork
41
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di fsprojects/FsHttp

Tutte le issue di fsprojects/FsHttp

Issue simili

Altre issue su Backend & API Design

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.