You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems like Misk has no builtin marshaller for kotlin.ByteArray to applicationcon/octetstream by default.
My web action tries to return a PDF file, I set the web action annotation to @ResponseContentType(MediaTypes.APPLICATION_OCTETSTREAM) and return type as Response
Got this error:
1) [Guice/ErrorInjectingConstructor]: IllegalArgumentException: no marshaller for application/octetstream as Response<kotlin.ByteArray>
at WebActionsServlet.<init>(WebActionsServlet.kt:42)
at WebActionsServlet.class(WebActionsServlet.kt:37)
at JettyService.<init>(JettyService.kt:58)
\_ for 2nd parameter
at JettyService.class(JettyService.kt:49)
while locating JettyServic
Both ByteArray and APPLICATION_OCTETSTREAM are often used in web, so is there any configuration I missed that can be turned on?
If not could you provide some links about how to inject the marshaller in Misk?
Update:
It would be nice to support ByteArray here:
The text was updated successfully, but these errors were encountered:
izaxs
changed the title
no marshaller for application/octetstream as Response<kotlin.ByteArray>
No builtin marshaller support for converting Response<kotlin.ByteArray> to application/octetstream
Jan 10, 2023
izaxs
changed the title
No builtin marshaller support for converting Response<kotlin.ByteArray> to application/octetstream
No builtin marshaller support for converting kotlin.ByteArray to application/octetstream
Jan 10, 2023
It seems like Misk has no builtin marshaller for kotlin.ByteArray to applicationcon/octetstream by default.
My web action tries to return a PDF file, I set the web action annotation to @ResponseContentType(MediaTypes.APPLICATION_OCTETSTREAM) and return type as Response
Got this error:
Both ByteArray and APPLICATION_OCTETSTREAM are often used in web, so is there any configuration I missed that can be turned on?
If not could you provide some links about how to inject the marshaller in Misk?
Update:
It would be nice to support ByteArray here:
misk/misk/src/main/kotlin/misk/web/marshal/Generic.kt
Line 96 in 39e01cb
The text was updated successfully, but these errors were encountered: