on ‎2024 Oct 30 9:53 AM
Hello!
Question summary: Can the Java CAP framework return other content-types than xml and json with a custom event handler?
For odata the standard return content-types are xml and json, but if client and server specify the correct accept headers, than it is possible other content-types. I saw nothing in the Java CAP documentation regarding setting the content type. The implementation of the result object requires iterable maps. Given our niche use-case and the missing indication on the documentation, I assume the answer to my question is no.
We need to provide our users with a plain text file with some data from our database. The content of the file created in our Java CAP application. The function to create the file content needs to be in the backend as it is needed in some other processes. The frontend is a SAP Fiori app. My approach is to use a function on my service and to return the calculated file content. Ideally would be to be able to return text/plain. My workaround would be to return json with a list of strings and use JavaScript to create the text file in the frontend. I also thought about creating a rest controller with the spring boot functionality, but I'd like to keep the implementation close to the standard.
I am happy to hear, it there is a solution to my problem.
I am also happy to hear, if you are not aware of a solution and to our knowledge my assumption is correct.
Thank you and best regards,
Moritz
Request clarification before answering.
| User | Count |
|---|---|
| 12 | |
| 9 | |
| 7 | |
| 5 | |
| 4 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.