1602 / 1602/compound

custom respondToformat

Aperta
#584 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
1.6k
Fork
179
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I wanted to add custom respondto format for handling msgpack requests. I thought I could write

c.respondTo (format) ->
format.msgpack ->
c.send buffer.toJSON()

The above code didn't work. Is there any support for responding to custom formats?

Thanks
-Kesav

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Look at the respondTo method in the compound framework's source code, likely in a controller or response handling module. Understand how existing formats like JSON or HTML are registered and dispatched. Adding a new format involves extending the format registry and defining the serialization logic. Test by creating a controller action that uses the new msgpack format.

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

Valutazione

Stack tecnologico
javascript, node.js
Ambito
api, backend
Tipo di issue
Funzionalità
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.