Hi Team,
I have the requirement where I have to generate the adaptive pdf as resultant pdf. I have used the renderPDFForm service of FormService to generate the adaptive pdf. But when I am hitting the REST API from the postman am getting 200 response code with unreadable response. There is another team who is consuming our REST API in order to get the adaptive pdf and stored it in the database.
I wanted to understand how upstream consume our REST API that's having unreadable response.
Views
Replies
Total Likes
Which endpoint are you trying?
REST API from process design
Views
Replies
Total Likes
Could you elaborate "adaptive pdf"?
Do you want to merge the data from the adaptive form into a pdf? You can leverage DoR service to generate the output pdf and the resultant pdf can be fetched/downloaded via API call from Postman.
I just got your latest response. It seems you're using the JEE process to fetch/convert the PDF. The above-mentioned solution is specific to the Adaptive form use cases.
Thanks @Pulkit_Jain_ @gbedekar for quick response. Really appreciate .
Actually the problem is that there is another team who is consuming our REST API for ex: "https://hostname:port/rest/services/xyz:1.0" . When I am hitting this url through postman it is giving 200 code but unreadable response The other consuming teams expecting readable output response from postman as below Screen shot. can we not get the readable response? OR how other team consume REST API
Views
Replies
Total Likes
Ok, so you're getting the pdf as a response.
Do you have the header response content-type set to "application/pdf" as this seems to be set to text/xml.
You should be able to download/save the output as a pdf.
hi @Pulkit_Jain_ ,
Correct, content-type set to "application/pdf" has not there. I am able to download the pdf while hitting the url from browser.
do u have any idea,
when I am hitting the same API from browser its giving 302 response code while in postman its having 200 response code.
why there is different response code having the same API.
Views
Replies
Total Likes
Didn't get your last response.
Did you try to change the content type header to "application/pdf" to see if that helps?
@Amreen1 Did you find the suggestions helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!
Views
Replies
Total Likes
Views
Likes
Replies