ERROR 1109: Specified URL is invalid using cURL command to API

This is my first time trying to use a cURL command. I have checked the URL and it is correct and have taken the exact cURL command and run it manually and it works. I have searched the community and was unable to find a solution for this problem. Please note I expanded the “JOIN” blocks to show the url on it’s own line as to assist you in analyzing my problem.
Thanks

can you explain, what should happen if this would be working?

remove the web component… what will be returned from the Run method itself?
see also some examples by @juananton1991 here

I’m curious, if you get this running… because the web component does not support multipart/form-data … probably you can get it running using that extension… keep us updated about your progress…

Taifun

Thanks for the reply. I will do as you suggested. This a trial/demo for a photo app and this is what should happen after user takes pictures
A) The cURL command sends the photos, along with instructions, to an API requesting the background be removed and placed with another image (also in the cURL command) along with a couple of other items
B) The finished images are returned to the app as part of the demonstration.

This is only for the demo. For normal, non-trial, use the app uploads the images to Firebase Storage and there I am using java script in their simulated backend to automatically process the images further, then uploads the finished images to a public bucket to be retrieved. The reason I am trying this method is for speed. Uploading the trial images and processing them as usual takes several minutes each, and I have to have the app continually check to see if they are finished before it can download them. This new way would deliver a less processed, lower quality result, but should be good enough to serve as a demo for prospective users.

If I remove the web components what block do you recommend I attach the run command to? According to the sample by juananto1991 he plugged into a label.text block. When I tried this I did not work. No error message and the app continues without performing the cURL command.

usually to display the result of the Run method you can use a label

probably the file paths are not correct…
are you test using the companion app?
where are the images stored? in the assets? in the ASD - application specific directory?
probably the extension is not able to access the images like this?
it might help to use one of the extensions, which provide the path to the ASD easier, which also works for the companion app…

  1. App Inventor Extensions: File | Pura Vida Apps or
  2. FileTools Extension by vknow360 or
  3. Get the path of → ASD (app-specific dir) & → private data dir (internal storage)

in a first step are you able to simplify the example a little bit for example to only get A) running?

Taifun

Thanks for the reply. First off the app works fine, the paths are correct and the images are store in the ASD. I can not run this in companion because I need to use Firebase. My apps requires access to more images than can be stores in assets, so if I disable Firebase then the app would not run because of missing items. The problem is I am not able to run the cURL command because Kodular states the URL is invalid. I have removed the variables and ran the command as a string and get the same error. , I changed the cURL command to request the images from a url instead of a file with same results. When I run the cURL command, with a URL for the image request, it works fine. My problem is I need to run the above cURL command from within the app and can’t. Is there another component or extension (other than WEB) that would give me access to a command line to run a cURL command? Thanks for you time and expertise in helping with this issue.

Good morning,
I have plugged the terminal extension into different blocks and it appears to work with some, but I am unable to retrieve/save the results. Just as when juananto1991 used the label.text block the result was a copy of the cURL command. Do you know what block(s) I should try? The returning data for my project is a photo.
Thanks
Mike

sorry, I never tried the extension, @juananton1991 might be able to help…
Taifun