Hi,

I am trying to create a record in a Mysql BD. In the client I use the new 
API Rest but it sends me the following error when I include a Param method 
with Body:

*"[EDT] 0: 0: 0.2 - Exception: java.lang.IllegalStateException - Request 
body and arguments are mutually exclusive, you can't use both"*

On the server I use Spring Boot and I accept the 2 conditions (at least it 
doesn't send compilation error).
Any idea how to do it correctly?

*My client code:*
    public static Response addMarcacion(Marcacion m) {
        Response<String> r = Rest.post(SERVER_URL + 
"marcacion/adicionCambio").
                jsonContent().
                queryParam("token", UsuarioService.getToken()).
                body(m.getPropertyIndex().toJSON()).getAsString();
        return r;
    }

*My server code;*
    @RequestMapping(method = RequestMethod.POST,value = "/adicionCambio")
    public @ResponseBody String addMarcacion(
    @RequestParam(name="token", required = true) String token, 
    @RequestBody MarcacionDAO mDAO) throws IOException, ParseException {
        if(mDAO.getMarcacionID() != null) {
        marcaciones.updateMarcacion(token, mDAO);
            return mDAO.getMarcacionID().toString();
        } else {
            return marcaciones.addMarcacion(token, mDAO);
        }
    }

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/9dea1879-25a4-4a7e-9bd5-089bd8b64f59%40googlegroups.com.

Reply via email to