I did one project in Android (Retrofit) ,I could have gotten response fine in APP,but I don't know how to get response in Postman and Advanced REST client , my issue is how do I send file Type(I don't know what to call it is),In project I achieved by putting new TypedFile("image/png",...
but how would I put these parameters in Postman and Advanced REST client? I want to check and know about it, I searched lot and I tried lot but no result. Please help me...
Here is project code:
MultipartTypedOutput multipartTypedOutput = new MultipartTypedOutput();
try {
multipartTypedOutput.addPart("originalImgBlob", new TypedFile("image/png", files.get(0)));
multipartTypedOutput.addPart("img430Blog", new TypedFile("image/png;base64", files.get(1)));
multipartTypedOutput.addPart("img200Blog", new TypedFile("image/png;base64", files.get(2)));
multipartTypedOutput.addPart("img100Blog", new TypedFile("image/png;base64", files.get(3)));
multipartTypedOutput.addPart("blurResponseBlob", new TypedFile("image/png;base64", files.get(4)));
Log.d("UploadActivity", "postNewsFeed() returned: " + "" + files.get(2));
} catch (Exception e) {
e.printStackTrace();
}
doServereCall(multipartTypedOutput);
/* Set profile pic in registration */
@Headers("Accept:application/json")
@POST("/api/mbrphotos/prfImgIU/{memberId}/{actionType}")
public void sendMultiImages(@Path("memberId") String memberId,
@Path("actionType") String actionType,
@Body MultipartTypedOutput multipartTypedOutput, Callback<JsonObject> callback);
You can check API response in postman by following steps :
Choose files
Browse button is available to you to select file.