qrest.Response may carry content type information.
If available, it will be used when creating the http response (overriding other automagic smartness in SendResponse participant.
It was the case that when the Response body was a String (instead of an object serialized by ObjectMapper), and SendResponse didn't have its content-type property set, then no content-type would be sent in the http response. Now the creator of the Response object has the chance to make the content type explicit.
qrest.SendResponse handles a byte[] body directly, instead of having to do multiple String wrappings and unwrappings.
For example, in the case of having to wrap the byte [] output of a JSONPackager.pack() in a String, only for it to be unrwapped again by SendResponse.
Two features
qrest.Response
may carry content type information.If available, it will be used when creating the http response (overriding other automagic smartness in
SendResponse
participant.It was the case that when the
Response
body was aString
(instead of an object serialized byObjectMapper
), andSendResponse
didn't have itscontent-type
property set, then nocontent-type
would be sent in the http response. Now the creator of theResponse
object has the chance to make the content type explicit.qrest.SendResponse
handles abyte[]
body directly, instead of having to do multiple String wrappings and unwrappings.For example, in the case of having to wrap the
byte []
output of aJSONPackager.pack()
in a String, only for it to be unrwapped again bySendResponse
.