cascade icon indicating copy to clipboard operation
cascade copied to clipboard

Many `responseContentType` in `HttpResourceActor`

Open michalkowol opened this issue 9 years ago • 1 comments

/**
* 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 avatar Mar 23 '15 21:03 michalkowol

@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.

2rs2ts avatar Mar 25 '15 00:03 2rs2ts