Re: Rest API - need help in sending attachment

2022-04-15 Thread Rishi Agr
Hi Johan, Thank you for the suggestion. I will try this out. It would be better if there's something at framework level that avoids the extra implementation as the attachments are very much needed in the application. On Thu, Apr 14, 2022, 12:51 Johan Cronje wrote: > Hi Rishi, > > A suggestion

Re: Rest API - need help in sending attachment

2022-04-14 Thread Johan Cronje
Hi Rishi, A suggestion that I have used previously was to encode a file as base64, send it as part of the JSON body and rebuild it within a java service, this way multiple files can also be uploaded: { "files": [ { "file_name": "fileName.pdf", "content_type": "application/pdf", "file_content":

Rest API - need help in sending attachment

2022-04-14 Thread Rishi Agr
Hi, I am trying to send attachment in a post request and I am unable to. I've used multipart/* as the consumer content-type and it's not working. I tried to debug and found that post request takes only application/json. The OPTIONS request had all the types supported and I tried that as well.