custom respondToformat
- Ngôn ngữ chính
- JavaScript
- Star
- 1.6k
- Fork
- 179
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript, node.js
- Lĩnh vực
- api, backend
- Loại issue
- Tính năng
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100