Reputation:
I am subscribing to a service HTTP get
call hitting which i am downloading a pdf document.
How can i use that document, saving in any variable and trigger HTTP POST
call so that i can send that document to server on any specific Action ?
Another doubt - How to get that document/document response and store it any variable ? After hitting that HTTP GET
call simply file is getting downloaded. How to access that document in code ?
Server Language: Java
FrontEnd: Angular
Upvotes: 1
Views: 375
Reputation: 513
Convert your pdf file into BSON(Binary JSON)/ base64 type, Simply store that converted data in string variable, And pass that data into body of your HTTP POST.
Upvotes: 1