While performing testing RESTFUL Web Service using POSTMAN, I encountered the below error :
415 UnSupported Media Type
Currently in my code, I'm using MediaType.TEXT_PLAIN. This is due to one of the answer from page enter link description here telling that if you need to return integer, you need to use TEXT_PLAIN.
May I know is the data that I provide in the web service is compatible with TEXT_PLAIN or not.
@POST
@Path("/post")
@Produces(MediaType.TEXT_PLAIN)
public int adaptiveAuth( @FormDataParam("uuid") String uuID,
@FormDataParam("browserinfo") String browserInfo,
@FormDataParam("ipint") long ipInt,
@FormDataParam("lat") double latiTude,
@FormDataParam("longitude") double longiTude,
@FormDataParam("sessionid") String sessionID,
@FormDataParam("spid") String spID,
@FormDataParam("tr") int tR,
@FormDataParam("jsnum") int jsNum,
@FormDataParam("fingerprint") String fingerPrint,
@FormDataParam("methodset") MethodClass[][] methodSet) throws SQLException{
The way I tested in Postman are describe as below: