I have a JAX-RS project where the POST
is not working. I have @GET
URLs which work fine. Everything seems to work fine except this @POST
.
@POST
@Path("/json/insert")
@Produces(MediaType.APPLICATION_JSON)
@Consumes("application/x-www-form-urlencoded")
public String postJSONInsert(
@FormParam("instance") String instance,
@FormParam("db") String table) {
String json;
EDPObject edp_obj = new EDPObject();
try {
json = edp_obj.insert("json", instance, table);
} catch(Exception e) {
edp_obj.endSession();
json = handleJSONError(e);
}
return json;
}
Getting 500 not yet connected
in firebug when trying this on client:
$.ajax('http://127.0.0.1:8070/sixaxis/webapi/json/insert', {
data: {
db: '17:2',
instance: 'shawn'
},
dataType: 'json',
type: 'POST'
});