Call NVIDIA Digits API from Android application

281 views Asked by At

I am trying to call the running instance of DIGITS from a front-end Android mobile application.

DIGITS provides a REST API so the curl command would be:

curl http://192.168.0.10:5000/models/images/classification/classify_one.json -XPOST -F job_id=20150604-034131-da2c -F image_file=@/path/to/image/desert_0.jpg

It is important to mention that the curl tool is using the Content-Type multipart/form-data according to RFC 2388. This enables uploading of binary files etc.

Many people use Android Volley for HTTP POST transfer however for multipart/form-data a custom request should be written which turns to be complex. I am looking to send parameter name/value to the server where value can be either an image or a String. I have tried so far to adapt the solutions suggested [here] and [here] but didn't figure out how to send name/value to the server.

Adapting these answers or suggesting some more up-to-date libraries would be great.

0

There are 0 answers