FaceRect

फ़्री
द्वारा apicloud | अपडेट किया गया 17 days ago | Media
लोकप्रियता

0.4 / 10

लेटेंसी

12ms

सेवा का स्तर

0%

Health Check

N/A

सभी चर्चाओं पर वापस जाएं

Any curl example for POSTing with image upload?

Rapid account: Normanpoh
normanpoh
10 years ago

Hello,

I’m new to Curl. How do I upload an image and call https://apicloud-facerect.p.mashape.com/process-file.json at the same time in Curl?

The following didin’t work but it illustrates what I want to do:

curl -i -F name=test -F filedata=@myfile.JPG --request POST ‘https://apicloud-facerect.p.mashape.com/process-file.json’ --header “X-Mashape-Authorization: <my code>” --insecure

Also, I used the insecure option because otherwise curl keeps complaining with the certificate issue.

Thanks for your help!

Rapid account: Apicloud
apicloud Commented 10 years ago

Hi there!

Thanks for interest in our API!

Here is a working cURL sample for you:

curl --request POST ‘https://apicloud-facerect.p.mashape.com/process-file.json’ --header “X-Mashape-Authorization: <your code>” -F “image=@test.jpg”

You may also add “-i” or “–include” if you need response headers.

“–insecure” shouldn’t really be necessary, we didn’t experience any problems with the certificate while testing.

Hope that helps!

चर्चा में शामिल हों - नीचे टिप्पणी जोड़ें:

नई टिप्पणियाँ पोस्ट करने के लिए लॉग इन / साइनअप करें