Replies
Welcome, guest
Join CrazyEngineers to reply, ask questions, and participate in conversations.
CrazyEngineers powered by Jatra Community Platform
-
@jason-IQjfPQ • Mar 22, 2016
The #-Link-Snipped-# annotation is used to specify the MIME media types of representations a resource can produce and send back to the client. Also, in the response sent back to the client the response header `Content-Type` is set to the MIME type passed to the annotation.
So,
@Produces(âtext/plainâ)
will generate a response which will contain just plain text.
@Produces(âapplication/pdfâ)
will generate a response with a document in .pdf format.
This documentation #-Link-Snipped-# has explained it very well. Do have a look at it. -
@roshni-prasad-GAhUza • Mar 28, 2016
Hi Jason,Jason EstibeiroThe #-Link-Snipped-# annotation is used to specify the MIME media types of representations a resource can produce and send back to the client. Also, in the response sent back to the client the response header `Content-Type` is set to the MIME type passed to the annotation.
So,
@Produces(âtext/plainâ)
will generate a response which will contain just plain text.
@Produces(âapplication/pdfâ)
will generate a response with a document in .pdf format.
This documentation #-Link-Snipped-# has explained it very well. Do have a look at it.
Thanks for the reply.
I would like to tell you that I am aware of the basic usage of @Produces.
What I wanted to know is can we use @Produces(âapplication/pdfâ) in-order to convert a java object to PDF file?