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

Consider `ForwardingRequestBody`

Aperta
#9,800 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@Amir-Golmoradi ci sta già lavorando.

Dal 21/10/2026.

  • #9808 di @Amir-Golmoradi — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
57/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
java, kotlin
Ambito
api, backend

Direzione di ricerca

Start by reading the RequestBody API and its existing subclasses to see how body behavior is exposed and forwarded. The issue proposes a ForwardingRequestBody that wraps a RequestBody and delegates its functions; check the related tests and add coverage showing the wrapper forwards the existing behavior. Done when callers can wrap a body without losing its behavior as the API evolves.

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

Descrizione

I want to change the Content-Type of a body, and so I'm wrapping it with my own RequestBody subclass. However, I'm not forced to forward isOneShot() or isDuplex() and so I didn't. Can I add those and forward them? Sure, but I'm also setting myself up for failure when another function is added in the future.

A ForwardingRequestBody which accepts a RequestBody and forwards all functions handles that for me. Further more, if new functions are added and OkHttp is upgraded my library inherits that behavior for free (without recompilation & release, too).

Lingua principale
Kotlin
Stelle
47.1k
Fork
9.3k
Merge medio
1g 16h
PR unite (30g)
31

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 lysine-dev/okhttp

Tutte le issue di lysine-dev/okhttp

Issue simili

Altre issue su Kotlin

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.