Closed sigmanil closed 3 years ago
Using BinaryRequest in the following way, and then using the data class as the input, seems to work:
const val contentType = "text/plain; charset=utf-8"
@BinaryRequest([contentType])
data class ImportParam(val stream: InputStream)
Is that the intended use? (Just confused because of the "binary" in the name.)
These things are handled by the BodyParser
and ResponseSerializer
, there is none for plain text, but you can create your own.
Copying BinaryContentTypeParser
would be a good start.
just make sure the module is registered in the context or the annotations won't work.
Since there is a solution and no further questions i am closing the issue.
I can't seem to figure out how to specify that an incoming post body, with "String" as the body type, should be something like "text/plain; charset=utf-8" instead of application/json.