May 2020
Intermediate to advanced
404 pages
10h 52m
English
Before we develop a client to send POST requests to the API server, let's test the API via cURL, which is a command-line tool used to simulate GET and POST requests to URLs.
Use the following command in Terminal or Command Prompt to make a curl request to your prediction API:
curl -X POST -F img=@"path_to_file" http://localhost/predict/
Here, the -F flag is used to indicate that the POST request will contain files. The name of the POST variable that will hold the file is img,path_to_file should be replaced with the full path to the file that you wish to send to the server for the image that the prediction is to be made on.
Let's see how the API works with an example.
Say we have the following image with the self2.png ...
Read now
Unlock full access