curl in microflow of transform cUrl in rest request

0
I have the following working cUrl (for compressing an PNG image)   curl https://api.tinify.com/shrink \      --user api:MYAPIKEY \      --header "Content-Type: application/json" \      --data '"source": {"url": "https://tinypng.com/images/panda-happy.png"} }' \      --dump-header /dev/stdout   How can I trigger/transform this cURL as a rest post request in a microflow?            
asked
2 answers
1

Hi Leon,

 

I looked at the API documentation https://tinypng.com/developers/reference

I created a TinifySource and TinifyResponse JSON’s and their Import and Export mappings

I used 2 actions from CommunityCommons:

  1. ORM:GetGUID to create a unique filename for the result
  2. Files:StoreURLToFileDocument 

 

 

This is the REST call:

 

 

 

 

The link to the project can be found here built in 10.1.1. (You should add your key to the Constant)

 

Go Make It

answered
0

This problem is solved after upgrading to Mendix 10.1.1

answered