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
The REST servlet chooses the response type based on the accepted client types and it configures the stream object accordingly. The operation does not choose and cannot change.
This is easier for the operation but for some requests it may need a different content type. A typical example is a REST api that produces some image or binary content when the image is found but need to produce a JSON error description when the image is not found.
The text was updated successfully, but these errors were encountered:
- add a Dynamic output stream whose real implementation can be
customized later either for XML, JSON, or raw mode with the
dedicated implementation allocated dynamically
- add a Get_Output_Stream on the Response to build an XML, JSON
or a Dynamic output stream
- add in the operation definition a list of supported stream types
- update the REST servlet to choose the appropriate output stream
according to what the operation supports, the defined mime types
and the Accept request header
- extract from the REST tests a generic package that can configure
the definition of the REST operation to use specific stream types
- instantiate REST tests for JSON, XML, Dynamic output stream
- update tests to check the content-type and ask for specific
content in the Accept header
The REST servlet chooses the response type based on the accepted client types and it configures the stream object accordingly. The operation does not choose and cannot change.
This is easier for the operation but for some requests it may need a different content type. A typical example is a REST api that produces some image or binary content when the image is found but need to produce a JSON error description when the image is not found.
The text was updated successfully, but these errors were encountered: