PDF File returned from JSON response as Binary Data
Budget: $10 – $30 USD
I am developing a whatsapp chatbot and I receive PDF files from customers submitted to the chatbot.
I am able to receive the file by making a GET call to url provided to me by facebook as seen below:
curl -X GET 'URL' \
-H 'Authorization: Bearer ACCESS_TOKEN' > media_file
Issue is, facebook returns response as binary data of media saved in media_file with response headers containing a content-type header to indicate the mime type of returned data.
I am not able to handle this response in php, and I will like to display file in browser or download to user PC after getting the data returned.
Task is to basically allow returned data to either show in web browser or allow user to download to PC.
I will provide URL and Access Token.
I am able to receive the file by making a GET call to url provided to me by facebook as seen below:
curl -X GET 'URL' \
-H 'Authorization: Bearer ACCESS_TOKEN' > media_file
Issue is, facebook returns response as binary data of media saved in media_file with response headers containing a content-type header to indicate the mime type of returned data.
I am not able to handle this response in php, and I will like to display file in browser or download to user PC after getting the data returned.
Task is to basically allow returned data to either show in web browser or allow user to download to PC.
I will provide URL and Access Token.