Hi Make Experts,
Need help on HTTP module. I not able to set query string “–silent --output thumbnail.jpg” in my HTTP module. Attached blueprint.
blueprint.json (20.8 KB)
curl https://api.tinify.com/output/xs2bes --header “Content-Type: application/json” --data ‘{ “resize”: { “method”: “fit”, “width”: 255, “height”: 340 }}’ --silent --output thumbnail.jpg
–silent
and –output
are cURL (software) options, they are not really supported by the HTTP module, which does not use cURL.
You need to find the external service’s API documentation for HTTP, not cURL.
You can also try using the HTTP “Get a file” module with the value of the “Location” header from the previous step.
samliew – request private consultation
Join the unofficial Make Discord server to chat with other makers!
2 Likes
I see. Thank you, Sam for your prompt response.
Could I know if any MAKE module support this CURL command?
curl https://api.tinify.com/output/xs2bes --user api:D9mgbCG --header “Content-Type: application/json” --data ‘{ “resize”: { “method”: “fit”, “width”: 255, “height”: 340 }}’ --dump-header /dev/stdout_th/dumpfile --silent --output thumbnail.jpg
You don’t even need an API key for the downloading of the file as the URL is public.
Just use the HTTP “Get a file” module like I mentioned.
samliew – request private consultation
Join the unofficial Make Discord server to chat with other makers!
1 Like
Hi Sam,
The URL is image file upload to TinyPNG, I will need to do compression and resize with that image. Then using CURL coomand to get --output optimzied.jpg. If no output file specificed, it will return bitmap.
If it’s a binary then it’s already a downloaded file.
You can upload it somewhere like Google Drive.
samliew – request private consultation
Join the unofficial Make Discord server to chat with other makers!
1 Like
Thanks again, Sam.
I need to upload to Glide Table. Let me try, will post result here.
Glide table see it as binary… need another converter?
Sorry, I’ve never used Glide before. You might need to start a new question about Glide.
1 Like
Sure, no prob. Will keep trying. Thank you for your good support, Sam.
2 Likes