java - Resltet does not return url params from post request -
i have post request:
https://localhost/rest/myapi/1.0/mystatusupdate?usr=me&pwd=secret
my request headers:
user-agent: fiddler content-type: application/x-www-form-urlencoded host: localhost content-length: 67
i use resltet
1.1. (this version of resltet here several years on project. , not been changed yet)
before, line of code returned me query parameters in url:
requestbodyparams = request.getentityasform() urlparams = request.getresourceref().getqueryasform()
requestbodyparams.size() = 0 if urlparams.size() > 0
i.e. can not any params requestbody if have some params passing in url.
even if have params in request body, request.getentityasform()
returns me emptiness if there params in url..
i wonder why? before worked.
it might related tomcat (before tomcat6
, use tomcat7
)
another words: have follow rule:
- put everything url params , not use request body (request body empty)
- put everything request body , not use url params
Comments
Post a Comment