You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I need to consume an API whose response is a .zip file. I tried to use sqlpage.fetch but I get the error 'Unable to convert the response from https://api.myapiad
dress.com/?id=xxxxx to a string. Only UTF-8 responses are supported.' Considering that after downloading I should unzip the .zip file (which contains an xml that needs to be processed), what would be the best option? Can I solve it only with SQLPage (but without sqlpage.exec) or should I implement an API in NodeJS or something else, and have that API download the zip and unzip) and call that API from SQLPAge?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Hi!
The best option is probably to use sqlpage.exec, and write a short shell script that downloads your file and unzips it.
https://sql.datapage.app/functions.sql?function=exec#function