Reputation: 21
Is is possible to exchange PDF file as a input for RESTful webservices and also I would like to send PNG image as a response to it. If we can do it through REST services please provide me the references link to implement it using REST services.
Upvotes: 0
Views: 1289
Reputation: 51
I was able to achieve a similar output by converting the file to string/byte[] data and sending it via REST.
My implementation was in Java and the steps used is outline below
Upvotes: 1
Reputation: 3704
A rest service isn't the right way for what you want. The input for this kind of services are HTTP request attributes or some kind of pushed data. Maybe it's possible to implement a file upload but it's not typical. For restful services is also common to tell your service how to handle the requested resource via the used request method (GET, POST, PUT, DELETE) The response of rest services is normally some kind of structured text output - for instance json.
All in all rest services seems to me not the way to implement your desired scenario. What about a normal cgi or servlet solution?
Upvotes: 0