cascade
cascade copied to clipboard
Many `responseContentType` in `HttpResourceActor`
/**
* The content type that this server provides, by default `application/json`
* @return a list of content types
*/
val responseContentType: ContentType = ContentTypes.`application/json`
As a developer, I would like to have a HttpResourceActor
that can convert a resource to many representations (like xml
, json
, yaml
etc.). Cascade should use Content negotiation to determinte response conten type.
HttpResourceActor.responseContentType
should be a list of Content Types.
@michalkowol we created Cascade for the purpose of creating JSON-REST APIs at PayPal. So it was not our original concern that we should be flexible enough to return other representations.
That said, when we have time (or if you want to do it, feel very free), this sounds like a reasonable addition to make.