Hi,
queryParam adds an argument to the request. When it's a get request it's 
added to the URL e.g. url?token=val
When it's a port request these parameters are placed in the body of the 
post (that's HTTP's form post standard). This is obviously problematic for 
this case. 

Some developers use the GET request semantic with POST but that goes 
against HTTP guidelines and some tools don't support that. You can hack it 
by changing the URL but the "right way" is to add the token as an HTTP 
header. This is the common convention and there are a few advantages to 
doing it this way. 

First in the server side you just need to do:
@RequestHeader(name="token", required = true) String token

That's it... Then in the client side you can do something like:
header("token", UsuarioService.getToken())

But there's an even better way:
NetworkManager.getInstance().addDefaultHeader("token", UsuarioService.
getToken());

This will work globally from this point onward.

-- 
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/c6c1df27-9b4a-4ab7-a1ab-4b86468494c2%40googlegroups.com.

Reply via email to