sample code like this
curl https://r.catchoom.com/v1/search \
-F "token=aaaaaaa" \
-F "image=@cc.jpg"
I want to know how to translate them to java code?
sample code like this
curl https://r.catchoom.com/v1/search \
-F "token=aaaaaaa" \
-F "image=@cc.jpg"
I want to know how to translate them to java code?
In curl -F means post the form data, usually the content type is multipart/form-data. You can use the Apache HttpClient library for this purpose in Java.
Here is an example of posting form using MultipartRequestEntity. Before looking into this example, I'll suggest you to try this example to be habituated with normal http POST.